← Standard library

Real

constraint Real
import Real from Wax;

Numeric operations plus floating-point classification. Equality and ordering follow the implementing type; built-in float and double treat NaNs as equal for these methods.

NumericConstraints.wax:37

Members

GetHashCodemethod

public fn GetHashCode() : uint32

Returns a hash consistent with value equality.

NumericConstraints.wax:41

ToStringmethod

public fn ToString() : string

Returns the value's text representation.

NumericConstraints.wax:45

ToStringBuffermethod

public fn ToStringBuffer(StringBuilder builder) : int32

Appends the text representation and returns the number of UTF-8 bytes appended.

NumericConstraints.wax:49

Equalsmethod

public fn Equals(this other) : bool

Tests value equality.

NumericConstraints.wax:53

CompareTomethod

public fn CompareTo(this other) : int32

Returns negative, zero, or positive for less, equal, or greater.

NumericConstraints.wax:57

IsNaNmethod

public fn IsNaN() : bool

Tests for a not-a-number value.

NumericConstraints.wax:61

IsInfinitymethod

public fn IsInfinity() : bool

Tests for either signed infinity.

NumericConstraints.wax:65

IsFinitemethod

public fn IsFinite() : bool

Tests that the value is neither infinite nor NaN.

NumericConstraints.wax:69

IsNegativeInfinitymethod

public fn IsNegativeInfinity() : bool

Tests specifically for negative infinity.

NumericConstraints.wax:73

Parsemethod

public static fn Parse(string text) : this?

Parses using the implementing type's default syntax, returning null on failure.

NumericConstraints.wax:77