| ExtensionMethodsIsWithinRange Method |
Check to see if a float is within of the bounds passed in.
Namespace:
DustProductions.Core
Assembly:
DustProductions.Core (in DustProductions.Core.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static bool IsWithinRange(
this float float1,
float minValue,
bool minIsInclusive,
float maxValue,
bool maxIsInclusive
)
Parameters
- float1
- Type: SystemSingle
The float to check - minValue
- Type: SystemSingle
The lower limit - minIsInclusive
- Type: SystemBoolean
Whether or not the lower limit is inclusive or exclusive - maxValue
- Type: SystemSingle
The upper limit - maxIsInclusive
- Type: SystemBoolean
Whether or not the upper limit is inclusive or exclusive
Return Value
Type:
BooleanTrue if the float passed in is within the limits passed in, false otherwise
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Single. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also