Class Angle.Turn

  • All Implemented Interfaces:
    java.util.function.DoubleSupplier
    Enclosing class:
    Angle

    public static final class Angle.Turn
    extends Angle
    Unit: turns.
    • Field Detail

      • WITHIN_0_AND_1

        public static final java.util.function.DoubleUnaryOperator WITHIN_0_AND_1
        Normalizing operator (result will be within the [0, 1[ interval).
    • Constructor Detail

      • Turn

        private Turn​(double angle)
        Create an instance.
        Parameters:
        angle - (in turns).
    • Method Detail

      • of

        public static Angle.Turn of​(double angle)
        Create an instance.
        Parameters:
        angle - (in turns).
        Returns:
        a new instance.
      • normalizer

        public static java.util.function.DoubleUnaryOperator normalizer​(double lo)
        Creates an operator for normalizing/reducing an angle. The output will be within the [lo, lo + 1[ interval.
        Parameters:
        lo - Lower bound of the normalized interval.
        Returns:
        the normalization operator.