tarcieri / micromath

Embedded Rust arithmetic, 2D/3D vector, and statistics library
Apache License 2.0
402 stars 21 forks source link

f32ext: ceil(x) and floor(x) #14

Closed tarcieri closed 5 years ago

tarcieri commented 5 years ago

Implements floor(x) by truncating and comparing if the truncated version is smaller.

Implements ceil(x) in terms of floor(x).