Function rufl::math::to_angle

source ·
pub fn to_angle(radian: f64) -> f64
Expand description

Converts radian value to angle value.

§Arguments

  • radian - The radian value to contert.

§Returns

Angle value.

§Examples

use rufl::math;

assert_eq!(180_f64, math::to_angle(std::f64::consts::PI));

assert_eq!(90_f64, math::to_angle(std::f64::consts::PI / 2.0));

assert_eq!(45_f64, math::to_angle(std::f64::consts::PI / 4.0));