tarcieri / micromath

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

Add `F32` newtype #72

Closed tarcieri closed 3 years ago

tarcieri commented 3 years ago

Adds a newtype for f32 which can be used as an alternative to F32Ext.

The longer-term goal is to implement all of the current floating point operations provided by this library on the newtype, and use the newtype to impl F32Ext.

This will also allow us to implement traits from the num-traits crate (#57).

codecov-io commented 3 years ago

Codecov Report

Merging #72 (138eab0) into main (2460c5e) will decrease coverage by 6.30%. The diff coverage is 20.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #72      +/-   ##
==========================================
- Coverage   60.67%   54.37%   -6.31%     
==========================================
  Files          35       36       +1     
  Lines         707      789      +82     
==========================================
  Hits          429      429              
- Misses        278      360      +82     
Impacted Files Coverage Δ
src/f32ext.rs 0.00% <0.00%> (ø)
src/float.rs 0.00% <0.00%> (ø)
src/float/utils.rs 68.96% <ø> (ø)
src/quaternion.rs 0.00% <ø> (ø)
src/vector.rs 0.00% <ø> (ø)
src/float/abs.rs 100.00% <100.00%> (ø)
src/float/acos.rs 100.00% <100.00%> (ø)
src/float/asin.rs 100.00% <100.00%> (ø)
src/float/atan.rs 100.00% <100.00%> (ø)
src/float/atan2.rs 100.00% <100.00%> (ø)
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2460c5e...138eab0. Read the comment docs.