1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
//! This crate provides two types ([`Angle`] and [`AngleUnbounded`]) that both represent an angle value
//! with no specific unit (radian, degree, etc.).
//!
//! They can be used in place of `f32` and `f64` for angle manipulations.
//!
//! # [`Angle`] vs [`AngleUnbounded`]
//!
//! [`Angle`] is a specific point of the circle.
//!
//! ```
//! # use angulus::Angle;
//! let a = Angle::from_degrees(90.0);
//! let b = Angle::from_degrees(450.0);
//!
//! assert_eq!(a, b);
//! ```
//!
//! While [`AngleUnbounded`] preserves the "number of turns".
//!
//! ```
//! # use angulus::AngleUnbounded;
//! let a = AngleUnbounded::from_degrees(90.0);
//! let b = AngleUnbounded::from_degrees(450.0);
//!
//! assert_ne!(a, b);
//! ```
//!
//! # The main range
//!
//! The main range for an angle is :
//!
//! - `(-π, π]` radians
//! - `(-180, 180]` degrees
//! - `(-0.5, 0.5]` turns
//! - `(-200, 200]` gradians
//!
//! # Display
//!
//! Since [`Angle`] and [`AngleUnbounded`] are unit-agnostic, they cannot implement the [`Display`][std::fmt::Display] trait.
//!
//! To display an angle with a specific unit, wrap it in one of the unit struct of [the `units` module][units].
//!
//! # Crate features
//!
//! - `std`: by default angulus links to the standard library. Disable this feature to remove this dependency and be able to use angulus in `#![no_std]` crates.
//! - `libm`: use the [libm crate](https://docs.rs/libm/latest/libm/) for the math methods (sin, cos, tan) when `std` is disabled.
//! - `serde`: enable serialization and deserialization with the [serde crate](https://docs.rs/serde/latest/serde/).
//! - `rand`: enable generation of random angle with the [rand crate](https://docs.rs/rand/latest/rand/).
pub use Angle;
pub use ToAngle;
pub use AngleUnbounded;
;
/// Type alias for [`Angle::<f32>`].
pub type Angle32 = ;
/// Type alias for [`Angle::<f64>`].
pub type Angle64 = ;
/// Type alias for [`AngleUnbounded::<f32>`].
pub type AngleUnbounded32 = ;
/// Type alias for [`AngleUnbounded::<f64>`].
pub type AngleUnbounded64 = ;