Trait glamour::AngleConsts
source · pub trait AngleConsts {
const PI: Self;
const TAU: Self;
const FRAG_1_PI: Self;
const FRAG_2_PI: Self;
const FRAG_PI_2: Self;
const FRAG_PI_3: Self;
const FRAG_PI_4: Self;
const FRAG_PI_6: Self;
const FRAG_PI_8: Self;
}
Expand description
Strongly typed angle constants.
These allow common constants used as angles to be strongly typed (so it’s
possible to write Angle::<f32>::PI
instead of
Angle::radians(core::f32::PI)
).
Note that this is also the most convenient way to get these constants in a
const
context. Since Angle
is a generic type, the
Angle::from_radians()
constructor cannot be
invoked in a const context. This is also why num_traits::FloatConst
is
not good enough.
Required Associated Constants§
Object Safety§
This trait is not object safe.