Float16 module

vector4_float16

procedureSource

Converts a Math.Vector4 to half precision.

Example↗
#import "Math";
h := vector4_float16(xyzw(1, 2, 3, 70000));
assert(float16_to_float32(h.w) > 1e30); // 70000 overflows to infinity
assert(float16_to_float32(h.y) == 2);
vector4_float16 :: (v: Vector4) -> Vector4_Float16

Parameters

Returns

See also