Class Angle

java.lang.Object
org.midheaven.math.Angle
All Implemented Interfaces:
Comparable<Angle>, Ordered<Angle>, AdditionGroup<Angle>, AdditionMonoid<Angle>

public class Angle extends Object implements AdditionGroup<Angle>, Ordered<Angle>
Represents Angle.
  • Method Details

    • ofRadians

      public static Angle ofRadians(Rational radians)
      Returns of Radians.
      Parameters:
      radians - the radians value
      Returns:
      the result of ofRadians
    • ofDegrees

      public static Angle ofDegrees(Rational degrees)
      Returns of Degrees.
      Parameters:
      degrees - the degrees value
      Returns:
      the result of ofDegrees
    • ofDegrees

      public static Angle ofDegrees(long degrees)
      Returns of Degrees.
      Parameters:
      degrees - the degrees value
      Returns:
      the result of ofDegrees
    • negate

      public Angle negate()
      Performs negate.
      Specified by:
      negate in interface AdditionGroup<Angle>
      Returns:
      the result of negate
    • minus

      public Angle minus(Angle other)
      Performs minus.
      Specified by:
      minus in interface AdditionGroup<Angle>
      Parameters:
      other - the other value
      Returns:
      the result of minus
    • plus

      public Angle plus(Angle other)
      Performs plus.
      Specified by:
      plus in interface AdditionMonoid<Angle>
      Parameters:
      other - the other value
      Returns:
      the result of plus
    • abs

      public Angle abs()
      Performs abs.
      Specified by:
      abs in interface AdditionGroup<Angle>
      Returns:
      the result of abs
    • isZero

      public boolean isZero()
      Checks whether is Zero.
      Specified by:
      isZero in interface AdditionMonoid<Angle>
      Returns:
      the result of isZero
    • compareTo

      public int compareTo(Angle other)
      Performs compareTo.
      Specified by:
      compareTo in interface Comparable<Angle>
      Parameters:
      other - the other value
      Returns:
      the result of compareTo
    • times

      public Angle times(Rational factor)
      Performs times.
      Parameters:
      factor - the factor value
      Returns:
      the result of times
    • over

      public Angle over(Rational factor)
      Performs over.
      Parameters:
      factor - the factor value
      Returns:
      the result of over
    • times

      public Angle times(long factor)
      Performs times.
      Parameters:
      factor - the factor value
      Returns:
      the result of times
    • over

      public Angle over(long factor)
      Performs over.
      Parameters:
      factor - the factor value
      Returns:
      the result of over
    • ratio

      public Rational ratio(Angle other)
      Performs ratio.
      Parameters:
      other - the other value
      Returns:
      the result of ratio
    • equals

      public boolean equals(Object other)
      Performs equals.
      Overrides:
      equals in class Object
      Parameters:
      other - the other value
      Returns:
      the result of equals
    • hashCode

      public int hashCode()
      Checks whether hash Code.
      Overrides:
      hashCode in class Object
      Returns:
      the result of hashCode
    • toString

      public String toString()
      Returns to String.
      Overrides:
      toString in class Object
      Returns:
      the result of toString