pub struct Radians(/* private fields */);Expand description
Radians is an angular measure that ranges from 0 to 2π (𝜏).
Implementations§
Source§impl Radians
impl Radians
Sourcepub const fn new(radians: f64) -> Radians
pub const fn new(radians: f64) -> Radians
Create a new Radians struct, initialized with the provided number of radians, ranging between 0 and to 2π (𝜏).
Examples found in repository?
examples/converto.rs (line 10)
3fn main() {
4 let tea_party = Lle::<Wgs84>::new(
5 Degrees::new(42.352211),
6 Degrees::new(-71.051315),
7 Meters::new(0.0),
8 );
9 let somewhere =
10 Lle::<Wgs72, Radians>::new(Radians::new(0.3), Radians::new(2.2), Meters::new(10.0));
11
12 // Our goal:
13 //
14 // Take a Wgs84 Lat/Lon in Degrees,and a Wgs72 Lat/Lon in Radians, and
15 // compute the look angle in the local tangent plane in Degrees.
16
17 let look: Aer<Degrees> = tea_party.aer_to(&somewhere.translate());
18
19 println!(
20 "A/E/R: {:?} {:?} {:?}",
21 look.azimuth, look.elevation, look.range
22 );
23}Trait Implementations§
impl Copy for Radians
impl StructuralPartialEq for Radians
Auto Trait Implementations§
impl Freeze for Radians
impl RefUnwindSafe for Radians
impl Send for Radians
impl Sync for Radians
impl Unpin for Radians
impl UnwindSafe for Radians
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more