namespace sys.core.lang
class Float
this Saturated{value: Float};
this Saturated{value: Double};
value=>
def Clamp(min: Float, max: Float);
Clamps the current mutable instance between `min` and `max`.
min=> the minimum value
max=> the maximum value
func Clamped(min: Float, max: Float): Float;
Returns the current instance clamped between `min` and `max`.
min=> the minimum value
max=> the maximum value
the clamped value
func Pow(exp: Float): Float;
Raises the instance to an exponent.
exp=> the exponent
the exponential
func ToString(): String;
Converts the value to a Utf8 string.
the resulting string
func @write(ref stream: Stream);
func @write(ref stream: Stream, format: OutputFormat);
Writes the value to an Utf8 text stream. Can use an optional output format specifier.
stream=> the output stream
format=> formatting information
func @put(ref stream: Stream);
Writes the value to a binary stream as a 32 bit floating point.
stream=> the output stream
def @get(ref stream: Stream);
Reads a 32 bit floating point from a binary stream.
stream=> the input stream
property IsNan: Bool; get;
Return true if the instance is not a number.
property IsInfinite: Bool; get;
Return true if the infinite.
property Abs: Float; get;
Returns the absolute value.
property Sqr: Float; get;
Returns the square of the value value.
property Sqrt: Float get = Math.Sqrt;
Returns the square root of the value.
property Floor: Float get = Math.Floor;
Returns the floor of a floating point value.
property Ceil: Float get = Math.Ceil;
Returns the ceiling of a floating point value.
property Round: Float get = Math.Round;
Returns the rounded value of a floating point.
property Trunc: Float get = Math.Trunc;
Returns the value truncated to the nearest integer value.
property Sin: Float get = Math.Sin;
property Cos: Float get = Math.Cos;
property Tan: Float get = Math.Tan;
property Sinh: Float get = Math.Sinh;
property Cosh: Float get = Math.Cosh;
property Tanh: Float get = Math.Tanh;
property Asin: Float get = Math.Asin;
property Acos: Float get = Math.Acos;
property Atan: Float get = Math.Atan;
property Asinh: Float get = Math.Asinh;
property Acosh: Float get = Math.Acosh;
property Atanh: Float get = Math.Atanh;
property Log: Float get = Math.Log;
Returns the natural logarithm of a value.
property Log2: Float get = Math.Log2;
property Log10: Float get = Math.Log10;
Returns the base 10 logarithm of a value.
const Zero: Float;
A Float instance representing a logical "0" value.
const One: Float;
A Float instance representing a logical "1" value.
const Min: Float;
The minimum value for a Float (32 bit floating point) instance.
const Max: Float;
The maximum value for a Float (32 bit floating point) instance.
const IsSigned;
Returns true if the floating point representation is signed.
const IsInteger;
Returns false.
const MaxDigitsLow;
The lower limit for the number of base 10 digits that are needed to represent a maximal value in textual form.
In base 10, you can have MaxDigitsLow digits that go though values 0-9.
Should not be used for buffer sizes.
const MaxDigitsHigh;
The upper limit for the number of base 10 digits that are needed to represent a maximal value in textual form.
In base 10, the `MaxDigitsHigh - MaxDigitsLow` most significant digits can't go though values 0-9 because they do not fit the binary representation.
Should not be used for buffer sizes.
const Nan;
The not a number value.
const Infinite;
Positive infinite.