octEncode

external fun octEncode(vector: Cartesian3, result: Cartesian2): Cartesian2(source)

Encodes a normalized vector into 2 SNORM values in the range of 0-255 following the 'oct' encoding.

Return

The 2 byte oct-encoded unit length vector.

Parameters

vector

The normalized vector to be compressed into 2 byte 'oct' encoding.

result

The 2 byte oct-encoded unit length vector.

See also