fromCartesian
external fun fromCartesian(cartesian: Cartesian3, result: EncodedCartesian3? = definedExternally): EncodedCartesian3(source)
Encodes a Cartesian3 with 64-bit floating-point components as two Cartesian3 values that, when converted to 32-bit floating-point and added, approximate the original input.
The fixed-point encoding follows Precisions, Precisions.
const cart = new Cartesian3(-10000000.0, 0.0, 10000000.0);
const encoded = EncodedCartesian3.fromCartesian(cart);Content copied to clipboard
Return
The modified result parameter or a new EncodedCartesian3 instance if one was not provided.
Parameters
cartesian
The cartesian to encode.
result
The object onto which to store the result.