Skip to main content

rad

Function rad 

Source
pub fn rad(v: f64) -> Angle
Expand description

Creates an angle from radians. Shorthand for Angle::from_radians.

ยงExample

use celestial_core::angle::rad;
use std::f64::consts::PI;

let angle = rad(PI);
assert!((angle.degrees() - 180.0).abs() < 1e-10);