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.

opBinary
half opBinary(T o)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
half opBinary(T o)
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
float opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
half opOpAssign(T o)
Undocumented in source. Be warned that the author may not have intended to support it.
opUnary
half opUnary()
Undocumented in source. Be warned that the author may not have intended to support it.
toFloat
float toFloat()

Converts to a float.

toString
string toString()

Converts to a pretty string.

Variables

value
ushort value;
Undocumented in source.

Bugs

rounding is not IEEE compliant.

Meta