OpenShot Audio Library | OpenShotAudio 0.3.2
|
#include <juce_Range.h>
Static Public Member Functions | |
static JUCE_CONSTEXPR Range | between (const ValueType position1, const ValueType position2) noexcept |
static Range | withStartAndLength (const ValueType startValue, const ValueType length) noexcept |
static JUCE_CONSTEXPR Range | emptyRange (const ValueType start) noexcept |
static Range | findMinAndMax (const ValueType *values, int numValues) noexcept |
A general-purpose range object, that simply represents any linear range with a start and end point.
Note that when checking whether values fall within the range, the start value is considered to be inclusive, and the end of the range exclusive.
The templated parameter is expected to be a primitive integer or floating point type, though class types could also be used if they behave in a number-like way.
Definition at line 39 of file juce_Range.h.
|
default |
Constructs an empty range.
Referenced by juce::Range< ValueType >::between(), juce::Range< ValueType >::emptyRange(), juce::Range< ValueType >::expanded(), juce::Range< ValueType >::findMinAndMax(), juce::Range< ValueType >::getIntersectionWith(), juce::Range< ValueType >::getUnionWith(), juce::Range< ValueType >::getUnionWith(), juce::Range< ValueType >::movedToEndAt(), juce::Range< ValueType >::movedToStartAt(), juce::Range< ValueType >::operator+(), juce::Range< ValueType >::operator-(), juce::Range< ValueType >::withEnd(), juce::Range< ValueType >::withLength(), juce::Range< ValueType >::withStart(), and juce::Range< ValueType >::withStartAndLength().
|
inlinenoexcept |
Constructs a range with given start and end values.
Definition at line 47 of file juce_Range.h.
|
default |
Constructs a copy of another range.
|
inlinestaticnoexcept |
Returns the range that lies between two positions (in either order).
Definition at line 59 of file juce_Range.h.
|
inlinenoexcept |
Returns the nearest value to the one supplied, which lies within the range.
Definition at line 215 of file juce_Range.h.
|
inlinenoexcept |
Returns a given range, after moving it forwards or backwards to fit it within this range.
If the supplied range has a greater length than this one, the return value will be this range.
Otherwise, if the supplied range is smaller than this one, the return value will be the new range, shifted forwards or backwards so that it doesn't extend beyond this one, but keeping its original length.
Definition at line 264 of file juce_Range.h.
|
inlinenoexcept |
Returns true if the given position lies inside this range. When making this comparison, the start value is considered to be inclusive, and the end of the range exclusive.
Definition at line 209 of file juce_Range.h.
|
inlinenoexcept |
Returns true if the given range lies entirely inside this range.
Definition at line 221 of file juce_Range.h.
|
inlinestaticnoexcept |
Returns a range with the specified start position and a length of zero.
Definition at line 73 of file juce_Range.h.
|
inlinenoexcept |
Returns a range which has its start moved down and its end moved up by the given amount.
Definition at line 164 of file juce_Range.h.
|
inlinestaticnoexcept |
Scans an array of values for its min and max, and returns these as a Range.
Definition at line 273 of file juce_Range.h.
Referenced by juce::FloatVectorOperations::findMinAndMax(), juce::FloatVectorOperations::findMinAndMax(), and juce::AudioFormatReader::readMaxLevels().
|
inlinenoexcept |
Returns the end of the range.
Definition at line 86 of file juce_Range.h.
|
inlinenoexcept |
Returns the range that is the intersection of the two ranges, or an empty range with an undefined start position if they don't overlap.
Definition at line 234 of file juce_Range.h.
|
inlinenoexcept |
Returns the length of the range.
Definition at line 83 of file juce_Range.h.
Referenced by juce::Range< ValueType >::constrainRange().
|
inlinenoexcept |
Returns the start of the range.
Definition at line 80 of file juce_Range.h.
|
inlinenoexcept |
Returns the smallest range that contains both this one and the given value.
Definition at line 248 of file juce_Range.h.
|
inlinenoexcept |
Returns the smallest range that contains both this one and the other one.
Definition at line 241 of file juce_Range.h.
|
inlinenoexcept |
Returns true if the given range intersects this one.
Definition at line 227 of file juce_Range.h.
|
inlinenoexcept |
Returns true if the range has a length of zero.
Definition at line 89 of file juce_Range.h.
|
inlinenoexcept |
Returns a range with the same length as this one, but moved to have the given end position.
Definition at line 139 of file juce_Range.h.
|
inlinenoexcept |
Returns a range with the same length as this one, but moved to have the given start position.
Definition at line 113 of file juce_Range.h.
|
inlinenoexcept |
Definition at line 202 of file juce_Range.h.
|
inlinenoexcept |
Returns a range that is equal to this one with an amount added to its start and end.
Definition at line 189 of file juce_Range.h.
|
inlinenoexcept |
Adds an amount to the start and end of the range.
Definition at line 171 of file juce_Range.h.
|
inlinenoexcept |
Returns a range that is equal to this one with the specified amount subtracted from its start and end.
Definition at line 196 of file juce_Range.h.
|
inlinenoexcept |
Subtracts an amount from the start and end of the range.
Definition at line 179 of file juce_Range.h.
Copies another range object.
|
inlinenoexcept |
Definition at line 201 of file juce_Range.h.
|
inlinenoexcept |
Changes the end position of the range, leaving the start unchanged. If the new end position is below the current start of the range, the start point will be pushed back to equal the new end point.
Definition at line 122 of file juce_Range.h.
|
inlinenoexcept |
Changes the length of the range. Lengths less than zero are treated as zero.
Definition at line 147 of file juce_Range.h.
|
inlinenoexcept |
Changes the start position of the range, leaving the end position unchanged. If the new start position is higher than the current end of the range, the end point will be pushed along to equal it, leaving an empty range at the new position.
Definition at line 96 of file juce_Range.h.
|
inlinenoexcept |
Returns a range with the same start position as this one, but a different end. If the new end position is below the current start of the range, the start point will be pushed back to equal the new end point.
Definition at line 133 of file juce_Range.h.
|
inlinenoexcept |
Returns a range with the same start as this one, but a different length. Lengths less than zero are treated as zero.
Definition at line 155 of file juce_Range.h.
|
inlinenoexcept |
Returns a range with the same end as this one, but a different start. If the new start position is higher than the current end of the range, the end point will be pushed along to equal it, returning an empty range at the new position.
Definition at line 107 of file juce_Range.h.
|
inlinestaticnoexcept |
Returns a range with a given start and length.
Definition at line 66 of file juce_Range.h.