#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

#749 in Math

Download history 1219/week @ 2023-12-12 913/week @ 2023-12-19 340/week @ 2023-12-26 969/week @ 2024-01-02 1133/week @ 2024-01-09 1367/week @ 2024-01-16 1303/week @ 2024-01-23 1497/week @ 2024-01-30 913/week @ 2024-02-06 983/week @ 2024-02-13 844/week @ 2024-02-20 875/week @ 2024-02-27 923/week @ 2024-03-05 991/week @ 2024-03-12 965/week @ 2024-03-19 697/week @ 2024-03-26

3,726 downloads per month
Used in 15 crates (4 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.2MB
~27K SLoC