Enum Quaternion.Type
- All Implemented Interfaces:
Serializable, Comparable<Quaternion.Type>
- Enclosing class:
Quaternion
For enabling optimized implementations.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classDefault implementations.private static final classImplementations for normalized quaternions. -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDefault implementation.Quaternion has unit norm.Quaternion has positive scalar part. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ToDoubleFunction<Quaternion> private final ToDoubleFunction<Quaternion> private final BiPredicate<Quaternion, Double> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateType(ToDoubleFunction<Quaternion> normSq, ToDoubleFunction<Quaternion> norm, BiPredicate<Quaternion, Double> isUnit) -
Method Summary
Modifier and TypeMethodDescription(package private) booleanisUnit(Quaternion q, double eps) (package private) doublenorm(Quaternion q) (package private) doublenormSq(Quaternion q) static Quaternion.TypeReturns the enum constant of this type with the specified name.static Quaternion.Type[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
Default implementation. -
NORMALIZED
Quaternion has unit norm. -
POSITIVE_POLAR_FORM
Quaternion has positive scalar part.
-
-
Field Details
-
normSq
-
norm
-
testIsUnit
-
-
Constructor Details
-
Type
private Type(ToDoubleFunction<Quaternion> normSq, ToDoubleFunction<Quaternion> norm, BiPredicate<Quaternion, Double> isUnit) - Parameters:
normSq-normSqmethod.norm-normmethod.isUnit-isUnitmethod.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
normSq
- Parameters:
q- Quaternion.- Returns:
- the norm squared.
-
norm
- Parameters:
q- Quaternion.- Returns:
- the norm.
-
isUnit
- Parameters:
q- Quaternion.eps- Tolerance.- Returns:
- whether
qhas unit norm within the allowed tolerance.
-