[][src]Module broccoli::convert

Helper functions to convert aabbs in floats to integers

The broccoli book mentioned in the root documentation shows that integer comparisons can be faster than floating point.

Here are some convinience functions that take a floating point, and then normalize it over an area as integers

Functions

point_f32_to_u16

Convert a f32 point to a normalized u32 point normalized over an area.

point_f32_to_u32

Convert a f32 point to a normalized u32 point normalized over an area.

rect_f32_to_u16

Convert a f32 rect to a normalizde u32 rect normalized over an area.

rect_f32_to_u32

Convert a f32 rect to a normalizde u32 rect normalized over an area.