Enum Quaternion.Type

java.lang.Object
java.lang.Enum<Quaternion.Type>
org.apache.commons.numbers.quaternion.Quaternion.Type
All Implemented Interfaces:
Serializable, Comparable<Quaternion.Type>
Enclosing class:
Quaternion

private static enum Quaternion.Type extends Enum<Quaternion.Type>
For enabling optimized implementations.
  • Enum Constant Details

    • DEFAULT

      public static final Quaternion.Type DEFAULT
      Default implementation.
    • NORMALIZED

      public static final Quaternion.Type NORMALIZED
      Quaternion has unit norm.
    • POSITIVE_POLAR_FORM

      public static final Quaternion.Type POSITIVE_POLAR_FORM
      Quaternion has positive scalar part.
  • Field Details

  • Constructor Details

  • Method Details

    • values

      public static Quaternion.Type[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Quaternion.Type valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • normSq

      double normSq(Quaternion q)
      Parameters:
      q - Quaternion.
      Returns:
      the norm squared.
    • norm

      double norm(Quaternion q)
      Parameters:
      q - Quaternion.
      Returns:
      the norm.
    • isUnit

      boolean isUnit(Quaternion q, double eps)
      Parameters:
      q - Quaternion.
      eps - Tolerance.
      Returns:
      whether q has unit norm within the allowed tolerance.