shadow:standard

Class float

Parent class

shadow:standard@Object

Interfaces

shadow:standard@FloatingPoint<float>, shadow:standard@Number<double>, shadow:standard@CanHash

immutable locked class float

Class float contains the methods that can be called on float values.

Constant Summary

Modifiers Type Name and Description
public immutable constant float PI

Closest float to the mathematical constant pi, the ratio of a circle's circumference to its diameter, approximately 3.1415927.

public immutable constant float E

Closest float to the mathematical constant e, the base of the natural logarithm, approximately 2.7182817.

public immutable constant float NaN

Constant representing one of the 32-bit not-a-number values supported by the IEEE 754 standard.

public immutable constant float INFINITY

Constant representing positive infinity with 32 bits in the IEEE 754 standard.

public immutable constant float NEGATIVE_INFINITY

Constant representing negative infinity with 32 bits in the IEEE 754 standard.

Create Summary

Modifiers Return Types Method and Description
public () create()

Destroy Summary

Modifiers Return Types Method and Description
public () destroy()

Method Summary

Modifiers Return Types Method and Description
public readonly locked (double) add(double other)

Adds a double to the current value and returns the resulting double.

public readonly locked (float) add(float other)
public readonly locked (float) ceiling()
public readonly locked (int) compare(double other)
public readonly locked (int) compare(float other)
public readonly (float) copy(AddressMap addresses)
public readonly locked (float) cos()
public readonly locked (double) divide(double other)

Divides the current value by a double and returns the quotient.

public readonly locked (float) divide(float other)
public readonly locked (boolean) equal(double other)
public readonly locked (boolean) equal(float other)
public readonly locked (float) floor()
public readonly locked (boolean) isFinite()

Checks to see if the current value represents an IEEE 754 value for a finite number.

public readonly locked (boolean) isInfinite()

Checks to see if the current value represents an IEEE 754 value for positive or negative infinity.

public readonly locked (boolean) isNaN()

Checks to see if the current value represents an IEEE 754 not-a-number value.

public readonly locked (float) logBase10()
public readonly locked (float) logBase2()
public readonly locked (float) logBaseE()
public readonly locked (double) modulus(double other)

Divides the current value by a double and returns the remainder.

public readonly locked (float) modulus(float other)
public readonly locked (double) multiply(double other)

Multiplies the current value by a double and returns the resulting double.

public readonly locked (float) multiply(float other)
public readonly locked (float) multiplyAdd(float multiplicand, float addend)
public readonly locked (float) negate()
public readonly locked (float) power(float value)
public readonly locked (float) power(int value)
public readonly locked (float) round()

Rounds the current float value to the nearest integer.

public readonly locked (float) sin()
public readonly locked (float) squareRoot()
public readonly locked (double) subtract(double other)

Subtracts a double from the current value and returns the resulting double.

public readonly locked (float) subtract(float other)
public readonly locked (float) tan()
public readonly locked (byte) toByte()
public readonly locked (code) toCode()
public readonly locked (double) toDouble()
public readonly locked (float) toFloat()
public readonly locked (int) toInt()
public readonly locked (long) toLong()
public readonly locked (short) toShort()
public readonly locked (String) toString()

Returns a String representation of the value, in base 10, with a maximum precision of 9 decimal digits, a threshold of 7 integer digits before scientific notation is used, and a threshold of 3 fractional digits without integer digits before scientific notation is used.

public readonly locked (String) toString(int maxPrecision, int integerThreshold, int fractionalThreshold)

Returns a String representation of the value, in base 10, with the specificed maximum precision of decimal digits, the specified threshold of integer digits before scientific notation is used, and the specified threshold of fractional digits without integer digits before scientific notation is used.

public readonly locked (ubyte) toUByte()
public readonly locked (uint) toUInt()
public readonly locked (ulong) toULong()
public readonly locked (ushort) toUShort()

Property Summary

Modifiers Return Types Method and Description
public readonly get locked (uint) bits()

Retrieves the representation of 32 bits that makes up the current float value, as a uint, except that all NaN values are treated as the same value.

public readonly get locked (ulong) hash()

Finds a hash value for the current value.

public readonly get locked (uint) raw()

Constant Detail

PI

public immutable constant float PI

Closest float to the mathematical constant pi, the ratio of a circle's circumference to its diameter, approximately 3.1415927.

E

public immutable constant float E

Closest float to the mathematical constant e, the base of the natural logarithm, approximately 2.7182817.

NaN

public immutable constant float NaN

Constant representing one of the 32-bit not-a-number values supported by the IEEE 754 standard.

INFINITY

public immutable constant float INFINITY

Constant representing positive infinity with 32 bits in the IEEE 754 standard.

NEGATIVE_INFINITY

public immutable constant float NEGATIVE_INFINITY

Constant representing negative infinity with 32 bits in the IEEE 754 standard.

Create Detail

create

public create() => ()

Destroy Detail

destroy

public destroy() => ()

Method Detail

add

public readonly locked add(double other) => (double)

Adds a double to the current value and returns the resulting double.

Parameters

other - value to add

Returns

sum of the two values

add

public readonly locked add(float other) => (float)

ceiling

public readonly locked ceiling() => (float)

compare

public readonly locked compare(double other) => (int)

compare

public readonly locked compare(float other) => (int)

copy

public readonly copy(AddressMap addresses) => (float)

cos

public readonly locked cos() => (float)

divide

public readonly locked divide(double other) => (double)

Divides the current value by a double and returns the quotient.

Parameters

other - value to divide by

Returns

quotient of the division

divide

public readonly locked divide(float other) => (float)

equal

public readonly locked equal(double other) => (boolean)

equal

public readonly locked equal(float other) => (boolean)

floor

public readonly locked floor() => (float)

isFinite

public readonly locked isFinite() => (boolean)

Checks to see if the current value represents an IEEE 754 value for a finite number.

Returns

true if the current value is finite

isInfinite

public readonly locked isInfinite() => (boolean)

Checks to see if the current value represents an IEEE 754 value for positive or negative infinity.

Returns

true if the current value is infinite

isNaN

public readonly locked isNaN() => (boolean)

Checks to see if the current value represents an IEEE 754 not-a-number value.

Returns

true if the current value is not a number

logBase10

public readonly locked logBase10() => (float)

logBase2

public readonly locked logBase2() => (float)

logBaseE

public readonly locked logBaseE() => (float)

modulus

public readonly locked modulus(double other) => (double)

Divides the current value by a double and returns the remainder.

Parameters

other - value to divide by

Returns

remainder of the division

modulus

public readonly locked modulus(float other) => (float)

multiply

public readonly locked multiply(double other) => (double)

Multiplies the current value by a double and returns the resulting double.

Parameters

other - value to multiply by

Returns

product of the two values

multiply

public readonly locked multiply(float other) => (float)

multiplyAdd

public readonly locked multiplyAdd(float multiplicand, float addend) => (float)

negate

public readonly locked negate() => (float)

power

public readonly locked power(float value) => (float)

power

public readonly locked power(int value) => (float)

round

public readonly locked round() => (float)

Rounds the current float value to the nearest integer.

Returns

current value rounded to the nearest integer

sin

public readonly locked sin() => (float)

squareRoot

public readonly locked squareRoot() => (float)

subtract

public readonly locked subtract(double other) => (double)

Subtracts a double from the current value and returns the resulting double.

Parameters

other - value to subtract

Returns

difference of the two values

subtract

public readonly locked subtract(float other) => (float)

tan

public readonly locked tan() => (float)

toByte

public readonly locked toByte() => (byte)

toCode

public readonly locked toCode() => (code)

toDouble

public readonly locked toDouble() => (double)

toFloat

public readonly locked toFloat() => (float)

toInt

public readonly locked toInt() => (int)

toLong

public readonly locked toLong() => (long)

toShort

public readonly locked toShort() => (short)

toString

public readonly locked toString() => (String)

Returns a String representation of the value, in base 10, with a maximum precision of 9 decimal digits, a threshold of 7 integer digits before scientific notation is used, and a threshold of 3 fractional digits without integer digits before scientific notation is used.

Returns

String representation

toString

public readonly locked toString(int maxPrecision, int integerThreshold, int fractionalThreshold) => (String)

Returns a String representation of the value, in base 10, with the specificed maximum precision of decimal digits, the specified threshold of integer digits before scientific notation is used, and the specified threshold of fractional digits without integer digits before scientific notation is used.

Returns

String representation

toUByte

public readonly locked toUByte() => (ubyte)

toUInt

public readonly locked toUInt() => (uint)

toULong

public readonly locked toULong() => (ulong)

toUShort

public readonly locked toUShort() => (ushort)

Property Detail

bits

public readonly get locked bits() => (uint)

Retrieves the representation of 32 bits that makes up the current float value, as a uint, except that all NaN values are treated as the same value.

Returns

bit representation of float value

hash

public readonly get locked hash() => (ulong)

Finds a hash value for the current value.

Returns

hash value

raw

public readonly get locked raw() => (uint)