#rad #arithmetic-operations #comparison #wrapping #conversion #angles

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

#575 in Math

Download history 631/week @ 2024-07-19 802/week @ 2024-07-26 652/week @ 2024-08-02 930/week @ 2024-08-09 697/week @ 2024-08-16 865/week @ 2024-08-23 1021/week @ 2024-08-30 1085/week @ 2024-09-06 1268/week @ 2024-09-13 1153/week @ 2024-09-20 757/week @ 2024-09-27 956/week @ 2024-10-04 1062/week @ 2024-10-11 1177/week @ 2024-10-18 791/week @ 2024-10-25 686/week @ 2024-11-01

3,924 downloads per month
Used in 19 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.4–1.2MB
~26K SLoC