Skip to main content

encode_position

Function encode_position 

Source
pub const fn encode_position(value: f64) -> i64
Expand description

Encodes a position component to the protocol’s fixed-point format.

Mirrors vanilla’s VecDeltaCodec.encode() which uses Math.round(). Java’s Math.round() rounds half towards positive infinity (half-up), which differs from Rust’s round() that rounds half away from zero.