Struct NumericRange
- Namespace
- Lime
- Assembly
- Lime.dll
Representation of numeric range of numbers around median.
public struct NumericRange : IEquatable<NumericRange>
- Implements
- Inherited Members
Constructors
NumericRange(float, float)
public NumericRange(float median, float dispersion)
Parameters
Fields
Dispersion
[YuzuMember]
public float Dispersion
Field Value
Median
[YuzuMember]
public float Median
Field Value
Properties
this[int]
Gets or sets the component by its index.
public float this[int component] { get; set; }
Parameters
componentint
Property Value
Methods
Equals(NumericRange)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(NumericRange rhs)
Parameters
rhsNumericRange
Returns
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
NormalRandomNumber()
Returns random number from a normal distribution with given median and variance (dispersion)
public float NormalRandomNumber()
Returns
NormalRandomNumber(IRandom)
public float NormalRandomNumber(IRandom rng)
Parameters
rngIRandom
Returns
NormalRandomNumber(Random)
public float NormalRandomNumber(Random rng)
Parameters
rngRandom
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
UniformRandomNumber()
Returns random number from uniform distribution with given median and range (note that Dispersion here is not the actual variance of a distribution but half of the range).
public float UniformRandomNumber()
Returns
UniformRandomNumber(IRandom)
public float UniformRandomNumber(IRandom rng)
Parameters
rngIRandom
Returns
UniformRandomNumber(Random)
public float UniformRandomNumber(Random rng)
Parameters
rngRandom
Returns
Operators
operator ==(NumericRange, NumericRange)
public static bool operator ==(NumericRange lhs, NumericRange rhs)
Parameters
lhsNumericRangerhsNumericRange
Returns
operator !=(NumericRange, NumericRange)
public static bool operator !=(NumericRange lhs, NumericRange rhs)
Parameters
lhsNumericRangerhsNumericRange