#arithmetic-operations #comparison #conversion #wrapper #wrapping #parameters #rad

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

#409 in Math

Download history 1069/week @ 2024-03-13 873/week @ 2024-03-20 732/week @ 2024-03-27 872/week @ 2024-04-03 1017/week @ 2024-04-10 1102/week @ 2024-04-17 1384/week @ 2024-04-24 1100/week @ 2024-05-01 1083/week @ 2024-05-08 955/week @ 2024-05-15 1063/week @ 2024-05-22 1296/week @ 2024-05-29 1082/week @ 2024-06-05 1137/week @ 2024-06-12 1128/week @ 2024-06-19 868/week @ 2024-06-26

4,548 downloads per month
Used in 18 crates (5 directly)

MIT license

19KB
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.3MB
~28K SLoC