Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct
Quantity::new
to be zero-cost for float storage types.
Use a default constant of `-0.0` to allow for floating point optimizations. For a value, `v: Float`, adding `-0.0` is a no-op while adding `0.0` will change the sign if `v` is `-0.0`. Resolves #143. v 0.0 + -0.0 = 0.0 -0.0 + 0.0 = 0.0 # v + 0.0 != v -0.0 + -0.0 = -0.0
- Loading branch information