![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
The minimum maximum values template class.
This template can be specialized with UInt32, SInt32, UInt64, SInt64, Float and Double, e.g:
Specialization of other datatypes require the LimitsType template parameter, e.g. use of System::Time:
The default constructor. Initialize the minimum with LimitsType::Max() and the maximum with LimitsType::Min().
Murl.Math.MinMax new()
Constructor to initialize with a given minimum and maximum value.
Murl.Math.MinMax new(Number min, Number max)
min | The minimum value. |
max | The maximum value. |
Constructor to initialize with given values. Initialize the minimum with LimitsType::Max() and the maximum with LimitsType::Min() and Add() values from an array.
Murl.Math.MinMax new(Murl.Array.Double values)
values | The values to add. |
Reset the minimum and maximum value. Set the minimum to LimitsType::Max() and the maximum to LimitsType::Min().
Reset()
Add a value. Set the minimum to the value if the value is less than the current minimum. Set the maximum to the value if the value is greater than the current maximum.
Add(Number value)
value | The value to add. |
Add values. Add() all values from an array.
Add(Murl.Array.Double values)
values | The values to add. |
Get the minimum.
Number GetMin()
Get the maximum.
Number GetMax()
Check if a value is in minimum / maximum range.
Boolean IsInRange(Number value)
value | The value to check. |
Check if a value is in minimum / maximum range excluding the bounds.
Boolean IsInRangeEx(Number value)
value | The value to check. |
Check if a value is in minimum / maximum range excluding minimum.
Boolean IsInRangeExMin(Number value)
value | The value to check. |
Check if a value is in minimum / maximum range excluding maximum.
Boolean IsInRangeExMax(Number value)
value | The value to check. |
Unite this MinMax with another MinMax object.
Unite(Murl.Math.MinMax other)
other | The other MinMax object to unite. |
Set the minimum.
SetMin(Number min)
min | The minimum to set. |
Set the maximum.
SetMax(Number max)
max | The maximum to set. |
Set the minimum and the maximum.
min | The maximum to set. |
max | The maximum to set. |
Get the string representation of the object.
String ToString()
Converts the object content to a string in a reasonable format.
Equal to comparison operator.