diff --git a/src/si/angular_jerk.rs b/src/si/angular_jerk.rs new file mode 100644 index 00000000..c45b9107 --- /dev/null +++ b/src/si/angular_jerk.rs @@ -0,0 +1,50 @@ +//! Angular jerk (base unit radian per second cubed, s⁻³). + +quantity! { + /// Angular jerk (base unit radian per second cubed, s⁻³). + quantity: AngularJerk; "angular jerk"; + /// Dimension of angular jerk, T⁻³ (base unit radian per second cubed, s⁻³). + dimension: ISQ< + Z0, // length + Z0, // mass + N3, // time + Z0, // electric current + Z0, // thermodynamic temperature + Z0, // amount of substance + Z0>; // luminous intensity + kind: dyn (::si::marker::AngleKind); + units { + /// Derived unit of angular jerk. + @radian_per_second_cubed: 1.0; "rad/s³", "radian per second cubed", + "radians per second cubed"; + @degree_per_second_cubed: 1.745_329_251_994_329_5_E-2; "°/s³", + "degree per second cubed", "degrees per second cubed"; + } +} + +#[cfg(test)] +mod tests { + storage_types! { + use num::One; + use si::angle as a; + use si::angular_jerk as aj; + use si::quantities::*; + use si::time as t; + use tests::Test; + + #[test] + fn check_units() { + test::(); + test::(); + + fn test, T: t::Conversion, R: aj::Conversion>() { + let cubic_second = Time::new::(V::one()) * + Time::new::(V::one()) * + Time::new::(V::one()); + + Test::assert_approx_eq(&AngularJerk::new::(V::one()), + &(Angle::new::(V::one()) / cubic_second).into()); + } + } + } +} diff --git a/src/si/mod.rs b/src/si/mod.rs index ce54423c..73e54085 100644 --- a/src/si/mod.rs +++ b/src/si/mod.rs @@ -49,6 +49,7 @@ system! { amount_of_substance::AmountOfSubstance, angle::Angle, angular_acceleration::AngularAcceleration, + angular_jerk::AngularJerk, angular_velocity::AngularVelocity, area::Area, available_energy::AvailableEnergy,