Function qsym2::auxiliary::geometry::get_proper_fraction
source · pub fn get_proper_fraction(
angle: f64,
thresh: f64,
max_trial_power: u32,
) -> Option<GenericFraction<u32>>
Expand description
Determines the reduced fraction where
and
are both integers representing a
proper rotation
corresponding to a specified rotation angle.
§Arguments
angle
- An angle of rotation.thresh
- A threshold for checking if a floating point number is integral.max_trial_power
- Maximum powerto try.
§Returns
An Option
wrapping the required fraction.
§Panics
Panics if the deduced order is negative.