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 k/nk/n where kk and nn are both integers representing a proper rotation CnkC_n^k 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 power kk to try.

§Returns

An Option wrapping the required fraction.

§Panics

Panics if the deduced order nn is negative.