Skip to main content

checked_add_position

Function checked_add_position 

Source
pub fn checked_add_position(
    position: IVec3,
    offset: IVec3,
) -> Result<IVec3, BlockGraphError>
Expand description

Adds offset to position, rejecting an i32 coordinate overflow.

ยงErrors

Returns BlockGraphError::CoordinateOverflow if any component overflows.