1
0
Fork 0
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:
jules 2016-07-07 11:10:35 +01:00
parent c9aca28d00
commit 332dcac07d

View file

@ -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