#arithmetic

angle

Angle wrapper to avoid ambiguous parameters + common operation over angles like wrapping, comparisons, arithmetic operations, trigonometric operations and conversions between rad and deg

15 releases

Uses old Rust 2015

0.5.0 Mar 29, 2022
0.4.0 Aug 16, 2019
0.3.5 Oct 6, 2017
0.1.55555 May 31, 2016
0.1.1 Jul 12, 2015
Download history 49/week @ 2022-01-20 41/week @ 2022-01-27 26/week @ 2022-02-03 63/week @ 2022-02-10 63/week @ 2022-02-17 45/week @ 2022-02-24 35/week @ 2022-03-03 47/week @ 2022-03-10 92/week @ 2022-03-17 66/week @ 2022-03-24 48/week @ 2022-03-31 37/week @ 2022-04-07 52/week @ 2022-04-14 75/week @ 2022-04-21 131/week @ 2022-04-28 216/week @ 2022-05-05

476 downloads per month
Used in 4 crates (via color-rs)

MIT license

18KB
612 lines

angle-rs

Build Status

Rust angle wrapper to avoid ambiguous parameters + common operation over angles like wrapping, comparisons, arithmetic operations, trigonometric operations and conversions between rad and deg.

assert!(Deg(20)>Deg(370))
assert!(Deg(20).min(Deg(370)) == Deg(370))
assert_eq!(Deg(180.0f32).sin(),Rad::pi().sin()) 

Dependencies

~0.5–1.2MB
~27K SLoC