mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-06 04:00:08 +00:00
Added a method Range::expanded()
This commit is contained in:
parent
c9aca28d00
commit
332dcac07d
1 changed files with 9 additions and 0 deletions
|
|
@ -172,6 +172,15 @@ public:
|
|||
return Range (start, start + newLength);
|
||||
}
|
||||
|
||||
/** Returns a range which has its start moved down and its end moved up by the
|
||||
given amount.
|
||||
@returns The returned range will be (start - amount, end + amount)
|
||||
*/
|
||||
Range expanded (ValueType amount) const noexcept
|
||||
{
|
||||
return Range (start - amount, end + amount);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
/** Adds an amount to the start and end of the range. */
|
||||
inline Range operator+= (const ValueType amountToAdd) noexcept
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue