pub fn get_proper_fraction(
angle: f64,
thresh: f64,
max_trial_power: u32,
) -> Option<GenericFraction<u32>>Expand description
Determines the reduced fraction $k/n$ where $k$ and $n$ are both integers representing a
proper rotation $C_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 $k$ to try.
§Returns
An Option wrapping the required fraction.
§Panics
Panics if the deduced order $n$ is negative.