shadow:standard

Interface FloatingPoint<T>

Interfaces

shadow:standard@Number<T>, shadow:standard@CanNegate<T>

interface FloatingPoint<T>

Interface FloatingPoint<T> specifies methods that any floating point representation of a number should have. Both the double and float types have this interface.

See Also

Method Summary

Modifiers Return Types Method and Description
public readonly (T) ceiling()

Method to find the smallest value with no fractional part that is greater than or equal to the current value.

public readonly (T) floor()

Method to find the largest value with no fractional part that is less than or equal to the current value.

public readonly (boolean) isFinite()

Method to determine if the number represented is finite (neither infinite nor a not-a-number value).

public readonly (boolean) isInfinite()

Method to determine if the number represented is infinite but not a not-a-number value.

public readonly (boolean) isNaN()

Method to determine if the number represented is a not-a-number value.

public readonly (T) round()

Method to round the current value to the nearest integer.

Method Detail

ceiling

public readonly ceiling() => (T)

Method to find the smallest value with no fractional part that is greater than or equal to the current value.

Returns

ceiling of the current value

floor

public readonly floor() => (T)

Method to find the largest value with no fractional part that is less than or equal to the current value.

Returns

floor of the current value

isFinite

public readonly isFinite() => (boolean)

Method to determine if the number represented is finite (neither infinite nor a not-a-number value).

Returns

true if the current value is finite

isInfinite

public readonly isInfinite() => (boolean)

Method to determine if the number represented is infinite but not a not-a-number value.

Returns

true if the current value is infinite

isNaN

public readonly isNaN() => (boolean)

Method to determine if the number represented is a not-a-number value. These values are used to represent the result of undefined computations, such as the square root of a negative number or 0.0 / 0.0.

Returns

true if the current value is not a number

round

public readonly round() => (T)

Method to round the current value to the nearest integer.

Returns

current value rounded to the nearest integer