half

16-bits floating point type (Half). Implements conversion from ftp://www.fox-toolkit.org/pub/fasthalffloatconversion.pdf by Jeroen van der Zijp.

Supports builtin operations that float support, but computations are performed in 32-bits float and converted back.

Constructors

this
this(float n)

Construct a half from a float.

this
this(half h)

Construct a half from another half.

Members

Functions

opAssign
half opAssign(T other)

Assign with float.

opAssign
half opAssign(T other)

Assign with another half.

toFloat
float toFloat()

Converts to a float.

toString
string toString()

Converts to a pretty string.

Bugs

rounding is not IEEE compliant.

Meta