Skip to main content

encode_scale

Function encode_scale 

Source
fn encode_scale(extents: Vec3) -> Vec3
Expand description

The reciprocal of extents, with degenerate axes collapsed to zero.

A zero-extent axis would otherwise scale by infinity and turn 0 * inf into NaN, so a collapsed axis has to encode onto the box center instead.