|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ca.uwaterloo.alumni.dwharder.Numbers.Quaternion
public class Quaternion
A class implementing quaternions using quartets of doubles.
This package allows the user to construct, manipulate, and model with quaternion. A quaternion is of the form a + ib + jc + kd where a, b, c, d are real numbers. The symbols i, j, and k commute with real numbers and obey the multiplication rules i2 = j2 = k2 = ijk = -1.
Quaternions are not commutative; for example, ij = k ≠-k = ji.
In the description of each non-static method, this quaternion is represented by q = a + ib + jc + kd. a and ib + jc + kd are the real and imaginary parts of q, respectively. The real numbers a, b, c, and d are the coefficients of the quaternion q. The components a, ib, jc, and kd will be referred to as the 0th, 1st, 2nd, and 3rd terms of the quatnerion q, respectively.
Any other quaternion is represented by r = e + if + jg + kh. The variables x and n are used represent real numbers and integers, respectively.
In reference to methods which must deal with branch cuts, the symbol u refers to any unit imaginary quaternion (real(u) = 0 and |u| = 1).
Instances of this class are immutable.
This class returns correct answers on branch cuts. Additionally, this class tries to give reasonable treatment to ∞ and NaN. For example, ONE.multiply(Double.POSITIVE_INFINITY) returns ∞ + i0 + j0 + k0. Most implementations would return ∞ + iNaN + jNaN + kNaN because they would simply each coefficient by the multiplier. This is probably not the desired result.
This class is based on the methods found in the Java classes Double, Math, and java.math.BigDecimal.
For those interested in rotations, see the rotateAround method.
There is very little interaction between the classes in this package. If there is a significant request for such behaviour, it will be added (seemlessly) in the future.
Double
,
Math
,
Serialized FormField Summary | |
---|---|
static Quaternion |
I
The constant i. |
static Quaternion |
J
The constant j. |
static Quaternion |
K
The constant k. |
static Quaternion |
NaN
The constant NaN + iNaN + jNaN + kNaN. |
static Quaternion |
ONE
The constant 1. |
static Quaternion |
ZERO
The constant 0. |
Constructor Summary | |
---|---|
Quaternion(double a)
Generates the quaternion a + i0 + j0 + k0. |
|
Quaternion(double[] v)
Generates a quaternion based on the entries of the array v. |
|
Quaternion(double x,
double[] v)
Generates the quaternion x + iv0 + jv1 + kv2. |
|
Quaternion(double b,
double c,
double d)
Generates the imaginary quaternion 0 + ib + jc + kd. |
|
Quaternion(double a,
double b,
double c,
double d)
Generates the quaternion a + ib + jc + kd. |
Method Summary | |
---|---|
double |
abs()
Returns the absolute value of this quaternion q. |
double |
abs2()
Returns the square of the absolute value of this quaternion q. |
double |
abs2Imag()
Returns the square of the absolute value of the imaginary part of this quaternion q. |
double |
absImag()
Returns the absolute value of the imaginary part of this quaternion q. |
Quaternion |
acos()
Returns the principal inverse cosine of this quaternion q. |
Quaternion |
acos(Quaternion u)
Returns the principal inverse cosine of this quaternion q. |
Quaternion |
acosh()
Returns the principal inverse hyperbolic cosine of this quaternion q. |
Quaternion |
acosh(Quaternion u)
Returns the principal inverse hyperbolic cosine of this quaternion q. |
Quaternion |
acot()
Returns the principal inverse cotangent of this quaternion q. |
Quaternion |
acot(Quaternion u)
Returns the principal inverse cotangent of this quaternion q. |
Quaternion |
acoth()
Returns the principal inverse hyperbolic cotangent of this quaternion q. |
Quaternion |
acoth(Quaternion u)
Returns the principal inverse hyperbolic cotangent of this quaternion q. |
Quaternion |
acsc()
Returns the principal inverse cosecant of this quaternion q. |
Quaternion |
acsc(Quaternion u)
Returns the principal inverse cosecant of this quaternion q. |
Quaternion |
acsch()
Returns the principal inverse hyperbolic cosecant of this quaternion q. |
Quaternion |
acsch(Quaternion u)
Returns the principal inverse hyperbolic cosecant of this quaternion q. |
Quaternion |
add(double x)
Returns the sum of this quaternion q and the real number x. |
Quaternion |
add(int n,
double x)
Returns this quaternion q with x added onto its nth term. |
Quaternion |
add(Quaternion r)
Returns the sum of this quaternion q and the quaternion r = e + if + jg + kh. |
Quaternion |
addI(double x)
Returns the sum of this quaternion q and the imaginary number ix. |
Quaternion |
addJ(double x)
Returns the sum of this quaternion q and the imaginary number jx. |
Quaternion |
addK(double x)
Returns the sum of this quaternion q and the imaginary number kx. |
double |
argument()
Returns the argument of this quaternion q. |
Quaternion |
asec()
Returns the principal inverse secant of this quaternion q. |
Quaternion |
asec(Quaternion u)
Returns the principal inverse secant of this quaternion q. |
Quaternion |
asech()
Returns the principal inverse hyperbolic secant of this quaternion q. |
Quaternion |
asech(Quaternion u)
Returns the principal inverse hyperbolic secant of this quaternion q. |
Quaternion |
asin()
Returns the principal inverse sine of this quaternion q. |
Quaternion |
asin(Quaternion u)
Returns the principal inverse sine of this quaternion q. |
Quaternion |
asinh()
Returns the principal inverse hyperbolic sine of this quaternion q. |
Quaternion |
asinh(Quaternion u)
Returns the principal inverse hyperbolic sine of this quaternion q. |
Quaternion |
atan()
Returns the principal inverse tangent of this quaternion q. |
Quaternion |
atan(Quaternion u)
Returns the principal inverse tangent of this quaternion q. |
Quaternion |
atanh()
Returns the principal inverse hyperbolic tangent of this quaternion q. |
Quaternion |
atanh(Quaternion u)
Returns the principal inverse hyperbolic tangent of this quaternion q. |
Quaternion |
ceil()
Returns the ceiling of each of the coefficients of this quaternion q. |
double |
coefficient(int n)
Returns the coefficient of the nth term of this quaternion q. |
Quaternion |
conjugate()
Returns the conjugate of this quaternion q. |
Quaternion |
cos()
Returns the cosine of this quaternion q. |
Quaternion |
cosh()
Returns the hyperbolic cosine of this quaternion q. |
Quaternion |
cot()
Returns the cotangent of this quaternion q. |
Quaternion |
coth()
Returns the hyperbolic cotangent of this quaternion q. |
Quaternion |
csc()
Returns the cosecant of this quaternion q. |
Quaternion |
csch()
Returns the hyperbolic cosecant of this quaternion q. |
Quaternion |
divide(Quaternion r)
Returns the quotient of this quaternion q over the quaternion r = e + if + jg + kh. |
boolean |
equals(java.lang.Object r)
This quaternion q equals the quaternion r = e + if + jg + kh if a == e, b == f, c == g, and d == h. |
boolean |
equals(java.lang.Object r,
double eps)
Returns true if this quaternion q equals the quaternion r = e + if + jg + kh. |
Quaternion |
exp()
Returns Euler's number (e) raised to the power of this quaternion q. |
Quaternion |
floor()
Returns the floor of each of the coefficients of this quaternion q. |
int |
hashCode()
Returns a hash code for the this quaternion q based on the coefficients. |
Quaternion |
horner(double[] v)
Evaluate the polynomial with real coefficients, given by the array of doubles v, at this quaternion q. |
Quaternion |
imag()
Returns the imaginary part of this quaternion q. |
double |
imagI()
Returns the coefficient of i of this quaternion q. |
static java.lang.String[] |
imaginaryUnits(java.lang.String[] units)
Set the strings to be used for the three imaginary units. |
double |
imagJ()
Returns the coefficient of j of this quaternion q. |
double |
imagK()
Returns the coefficient of k of this quaternion q. |
boolean |
isImaginary()
Returns true if the real part of this quaternion q is zero and false otherwise. |
boolean |
isImaginary(int n)
Returns true if the nth imaginary coefficient of this quaternion q is the only non-zero coefficient and false otherwise. |
boolean |
isImaginaryI()
Returns true if the only non-zero coefficient of this quaternion q is the coefficient of i and false otherwise. |
boolean |
isImaginaryJ()
Returns true if the only non-zero coefficient of this quaternion q is the coefficient of j and false otherwise. |
boolean |
isImaginaryK()
Returns true if the only non-zero coefficient of this quaternion q is the coefficient of k and false otherwise. |
boolean |
isInfinite()
Returns true if any coefficient of this quaternion q is infinite and false otherwise. |
boolean |
isNaN()
Returns true if any coefficient of this quaternion q is not-a-number (NaN) and false otherwise. |
boolean |
isReal()
Returns true if all the coefficients of the imaginary part of this quaternion q are zero, otherwise false. |
boolean |
isZero()
Returns true if all coefficients of this quaternion q are zero, otherwise false. |
Quaternion |
log()
Returns the natural logarithm of this quaternion q. |
Quaternion |
log(Quaternion u)
Returns the natural logarithm of this quaternion q. |
Quaternion |
log10()
Returns the logarithm base 10 of this quaternion q. |
Quaternion |
log10(Quaternion u)
Returns the natural logarithm of this quaternion q. |
Quaternion |
multiply(double x)
Returns the product of this quaternion q and the real number x. |
Quaternion |
multiply(Quaternion r)
Returns the product of this quaternion q and the quaternion r = e + if + jg + kh. |
Quaternion |
negate()
Returns the negative of this quaternion q. |
Quaternion |
pow(double x)
Returns this quaternion q raised to the real number x. |
Quaternion |
pow(int n)
Returns this quaternion q raised to the integer n. |
Quaternion |
pow(Quaternion r)
Returns this quaternion q raised to the quaternion r. |
Quaternion |
project(boolean[] v)
Project this quaternion q onto the subspace defined by the boolean vector v. |
Quaternion |
project(int n)
Project this quaternion q onto the nth term. |
static Quaternion |
random()
A factory method for constructing a quaternion with a random real and imaginary parts. |
Quaternion |
random(boolean[] v)
A factory method to create a random quaternion defined by the boolean vector v. |
static Quaternion |
random(int n)
A factory method for constructing a quaternion with a random nth coefficient. |
static Quaternion |
randomImaginary()
A factory method for constructing a imaginary quaternion with random imaginary coefficients. |
static Quaternion |
randomReal()
A factory method for constructing a quaternion with a random real part. |
double |
real()
Returns the real part of this quaternion q. |
Quaternion |
rint()
Returns each coefficient of the quaternion q rounded to the nearest double equal to an integer. |
Quaternion |
rotateAround(Quaternion r)
Rotate this imaginary quaternion q around the imaginary part of r, the angle of rotation being twice the argument of r. |
Quaternion |
sec()
Returns the secant of this quaternion q. |
Quaternion |
sech()
Returns the hyperbolic secant of this quaternion q. |
Quaternion |
signum()
Returns a normalized form of this quaternion q when it is non-zero and q otherwise. |
Quaternion |
sin()
Returns the sine of this quaternion q. |
Quaternion |
sinh()
Returns the hyperbolic sine of this quaternion q. |
Quaternion |
sqr()
Returns the square of this quaternion q. |
Quaternion |
sqrt()
Returns the square root of this quaternion q. |
Quaternion |
sqrt(Quaternion u)
Returns the square root of this quaternion q. |
Quaternion |
subtract(Quaternion r)
Returns the difference between this quaternion q and the quaternion r = e + if + jc + kd. |
Quaternion |
tan()
Returns the tangent of this quaternion q. |
Quaternion |
tanh()
Returns the hyperbolic tangent of this quaternion q. |
double[] |
toArray()
Converts this quaternion q in to an array of four doubles. |
double[] |
toArray(byte[] v)
Convert this quaternion q to an array of doubles. |
double[] |
toImagArray()
Converts the imaginary part of this quaternion q in to an array of three doubles. |
java.lang.String |
toString()
Returns a string representing this quaternion q. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Quaternion ZERO
public static final Quaternion ONE
public static final Quaternion I
public static final Quaternion J
public static final Quaternion K
public static final Quaternion NaN
Constructor Detail |
---|
public Quaternion(double a, double b, double c, double d)
Generates the quaternion a + ib + jc + kd.
a
- the real partb
- the coefficent of ic
- the coefficent of jd
- the coefficent of kpublic Quaternion(double a)
Generates the quaternion a + i0 + j0 + k0.
a
- the real partpublic Quaternion(double b, double c, double d)
Generates the imaginary quaternion 0 + ib + jc + kd.
b
- the coefficent of ic
- the coefficent of jd
- the coefficent of ktpublic Quaternion(double[] v)
Generates a quaternion based on the entries of the array v.
An array v of length 4 defines the quaternion v0 + iv1 + jv2 + kv3, and
an array v of length 3 defines the imaginary quaternion 0 + iv1 + jv2 + kv3.
v
- array of length 3 or 4public Quaternion(double x, double[] v)
Generates the quaternion x + iv0 + jv1 + kv2.
x
- the real partv
- an array defining the coefficients of the imaginary partMethod Detail |
---|
public static final Quaternion random()
Math.random()
public static final Quaternion random(int n)
A factory method for constructing a quaternion with a random nth coefficient.
Math.random()
public final Quaternion random(boolean[] v)
A factory method to create a random quaternion defined by the boolean vector v.
In the result, the coefficient of the nth term is a random double if vn == true.
v
- an array indicating a subspace
Math.random()
public static final Quaternion randomReal()
A factory method for constructing a quaternion with a random real part.
Math.random()
public static final Quaternion randomImaginary()
Math.random()
public final boolean equals(java.lang.Object r)
This quaternion q equals the quaternion r = e + if + jg + kh if a == e, b == f, c == g, and d == h.
Note: NaN == NaN returns false but 0.0 == -0.0 returns true.
equals
in class java.lang.Object
public final boolean equals(java.lang.Object r, double eps)
Returns true if this quaternion q equals the quaternion r = e + if + jg + kh.
Two nonzero quaternions o and p are equal up to ε if |q - r|/min( |q|, |r| ) < ε.
If q = 0 or r = 0 then we check that |q| < ε or |r| < ε, respectively.
eps
- the allowable relative difference: greater than or equal to 0
public final int hashCode()
Returns a hash code for the this quaternion q based on the coefficients.
hashCode
in class java.lang.Object
public final java.lang.String toString()
Returns a string representing this quaternion q.
If N0 = abs(a), N1 = abs(b), N2 = abs(c), and N3 = abs(d), then the return value is "[-]N0 (+|-) iN1 (+|-) jN2 (+|-) kN3".
toString
in class java.lang.Object
public static final java.lang.String[] imaginaryUnits(java.lang.String[] units)
Set the strings to be used for the three imaginary units.
For example, double[] {"i", "e'", "i'"}
.
public final double[] toArray()
public final double[] toArray(byte[] v)
Convert this quaternion q to an array of doubles.
The coefficient placed into the nth entry of the array is determined by vn.
v
- an array of 0, 1, 2, or 3, indicating which coefficient is to be placed into the nth entry of the array
public final double[] toImagArray()
public final boolean isZero()
public final boolean isReal()
public final boolean isImaginary()
public final boolean isImaginary(int n)
public final boolean isImaginaryI()
public final boolean isImaginaryJ()
public final boolean isImaginaryK()
public final boolean isNaN()
Double.isNaN(double)
public final boolean isInfinite()
Double.isInfinite(double)
public final double abs()
Returns the absolute value of this quaternion q.
abs(q) = |q| = sqrt(a2 + b2 + c2 + d2)
Special case:
public final double abs2()
Returns the square of the absolute value of this quaternion q.
abs2(q) = |q|2 = a2 + b2 + c2 + d2
Special case:
public final double absImag()
Returns the absolute value of the imaginary part of this quaternion q.
abs(imag(q)) = |imag(q)| = sqrt(b2 + c2 + d2)
Special case:
public final double abs2Imag()
Returns the square of the absolute value of the imaginary part of this quaternion q.
abs2(imag(q)) = |imag(q)|2 = b2 + c2 + d2
Special case:
public final double real()
Returns the real part of this quaternion q.
real(q) = a.
public final Quaternion imag()
Returns the imaginary part of this quaternion q.
imag(q) = ib + jc + kd
public final double imagI()
Returns the coefficient of i of this quaternion q.
imagI(q) = b
public final double imagJ()
Returns the coefficient of j of this quaternion q.
imagJ(q) = c
public final double imagK()
Returns the coefficient of k of this quaternion q.
imagK(q) = d
public final double coefficient(int n)
Returns the coefficient of the nth term of this quaternion q.
n
- the number (0, 1, 2, or 3) of the coefficient to return
public final Quaternion project(int n)
Project this quaternion q onto the nth term.
n
- the number of term (0, 1, 2, 3) to be projected onto
public final Quaternion project(boolean[] v)
Project this quaternion q onto the subspace defined by the boolean vector v.
In the result, the coefficient of the nth term is set to 0.0 if vn == false.
v
- an array indicating the terms to project onto
public final Quaternion conjugate()
Returns the conjugate of this quaternion q.
conjugate(q) = a - ib - jc - kd
public final double argument()
Returns the argument of this quaternion q.
This is a value on the interval [0, &pi]. For non-zero q, if u = imag(q)/|imag(q)| then q = |q|eu argument(q).
argument(q) = atan2( |imag(q)|, a )
public final Quaternion signum()
Returns a normalized form of this quaternion q when it is non-zero and q otherwise.
public final Quaternion add(Quaternion r)
Returns the sum of this quaternion q and the quaternion r = e + if + jg + kh.
q + r = (a + e) + i(b + f) + j(c + g) + k(d + h)
public final Quaternion add(int n, double x)
Returns this quaternion q with x added onto its nth term.
n
- the number (0, 1, 2, ..., 15) of the onto which to add x
public final Quaternion add(double x)
Returns the sum of this quaternion q and the real number x.
q + x = (a + x) + ib + jc + kd
public final Quaternion addI(double x)
Returns the sum of this quaternion q and the imaginary number ix.
q + ix = a + i(b + x) + jc + kd
public final Quaternion addJ(double x)
Returns the sum of this quaternion q and the imaginary number jx.
q + jx = a + ib + j(c + x) + kd
public final Quaternion addK(double x)
Returns the sum of this quaternion q and the imaginary number kx.
q + x = a + ib + jc + k(d + x)
public final Quaternion subtract(Quaternion r)
Returns the difference between this quaternion q and the quaternion r = e + if + jc + kd.
q - r = (a - e) + i(b - f) + j(c - g) + k(d - h)
public final Quaternion negate()
Returns the negative of this quaternion q.
-q = -a - ib - jc - kd
public final Quaternion multiply(Quaternion r)
Returns the product of this quaternion q and the quaternion r = e + if + jg + kh.
Multiplication is distributive with the following multiplication matrix for 1 and the imaginary units:
× | 1 | i | j | k |
1 | 1 | i | j | k |
i | i | -1 | k | -j |
j | j | -k | -1 | i |
k | k | j | -i | -1 |
In general, qr ≠ rq.
* @return qr
public final Quaternion multiply(double x)
Returns the product of this quaternion q and the real number x.
qx = ax + ibx + jcx + kdx
public final Quaternion divide(Quaternion r)
Returns the quotient of this quaternion q over the quaternion r = e + if + jg + kh.
q/r = qconjugate(r)/|r|2. In general, q/r ≠ (1/r)q.
public final Quaternion pow(Quaternion r)
Returns this quaternion q raised to the quaternion r.
public final Quaternion pow(double x)
Returns this quaternion q raised to the real number x.
public final Quaternion pow(int n)
Returns this quaternion q raised to the integer n.
public final Quaternion sqr()
Returns the square of this quaternion q.
public final Quaternion horner(double[] v)
Evaluate the polynomial with real coefficients, given by the array of doubles v, at this quaternion q.
If n = v.length - 1 then this method evaluates v0 + v1q + ... + vnqn using Horner's rule.
public final Quaternion sqrt()
Returns the square root of this quaternion q.
The branch cut is on (-∞, 0).
public final Quaternion sqrt(Quaternion u)
Returns the square root of this quaternion q.
The branch cut is on (-∞, 0).
On the branch cuts, the imaginary part is a multiple of the imaginary quaternion u.
u
- a non-zero imaginary quaternion
public final Quaternion rotateAround(Quaternion r)
r
- a finite non-zero imaginary quaternion
public final Quaternion exp()
Returns Euler's number (e) raised to the power of this quaternion q.
If u = imag(q)/|imag(q)| then eq = ea(cos|imag(q)| + u sin|imag(q)|).
public final Quaternion log()
Returns the natural logarithm of this quaternion q.
The branch cut is on (-∞, 0].
public final Quaternion log(Quaternion u)
Returns the natural logarithm of this quaternion q.
The branch cut is on (-∞, 0].
On the branch cuts, the imaginary part is a multiple of the imaginary quaternion u.
u
- a non-zero imaginary quaternion
public final Quaternion log10()
Returns the logarithm base 10 of this quaternion q.
The branch cut is on (-∞, 0].
public final Quaternion log10(Quaternion u)
Returns the natural logarithm of this quaternion q.
The branch cut is on (-∞, 0].
On the branch cuts, the imaginary part is a multiple of the imaginary quaternion u.
u
- a non-zero imaginary quaternion
public final Quaternion sin()
Returns the sine of this quaternion q.
public final Quaternion cos()
Returns the cosine of this quaternion q.
public final Quaternion tan()
Returns the tangent of this quaternion q.
public final Quaternion sec()
Returns the secant of this quaternion q.
public final Quaternion csc()
Returns the cosecant of this quaternion q.
public final Quaternion cot()
Returns the cotangent of this quaternion q.
public final Quaternion sinh()
Returns the hyperbolic sine of this quaternion q.
public final Quaternion cosh()
Returns the hyperbolic cosine of this quaternion q.
public final Quaternion tanh()
Returns the hyperbolic tangent of this quaternion q.
public final Quaternion sech()
Returns the hyperbolic secant of this quaternion q.
public final Quaternion csch()
Returns the hyperbolic cosecant of this quaternion q.
public final Quaternion coth()
Returns the hyperbolic cotangent of this quaternion q.
public final Quaternion asin()
Returns the principal inverse sine of this quaternion q.
The branch cuts are (-∞, -1) and (1, ∞).
public final Quaternion asin(Quaternion u)
Returns the principal inverse sine of this quaternion q.
The branch cuts are (-∞, -1) and (1, ∞).
On the branch cuts, the imaginary part is a multiple of the imaginary quaternion u.
u
- a non-zero imaginary quaternion
public final Quaternion acos()
Returns the principal inverse cosine of this quaternion q.
The branch cuts are (-∞, -1) and (1, ∞).
public final Quaternion acos(Quaternion u)
Returns the principal inverse cosine of this quaternion q.
The branch cuts are (-∞, -1) and (1, ∞).
On the branch cuts, the imaginary part is a multiple of the imaginary quaternion u.
u
- a non-zero imaginary quaternion
public final Quaternion atan()
Returns the principal inverse tangent of this quaternion q.
The branch cuts are (-u∞, -u] and [u, u∞).
public final Quaternion atan(Quaternion u)
Returns the principal inverse tangent of this quaternion q.
The branch cuts are (-u∞, -u] and [u, u∞).
On the branch cuts, the imaginary part is a multiple of the imaginary quaternion u.
u
- a non-zero imaginary quaternion
public final Quaternion asec()
Returns the principal inverse secant of this quaternion q.
The branch cut is (-1, 1).
public final Quaternion asec(Quaternion u)
Returns the principal inverse secant of this quaternion q.
The branch cut is (-1, 1).
On the branch cuts, the imaginary part is a multiple of the imaginary quaternion u.
u
- a non-zero imaginary quaternion
public final Quaternion acsc()
Returns the principal inverse cosecant of this quaternion q.
The branch cut is (-1, 1).
public final Quaternion acsc(Quaternion u)
Returns the principal inverse cosecant of this quaternion q.
The branch cut is (-1, 1).
On the branch cuts, the imaginary part is a multiple of the imaginary quaternion u.
u
- a non-zero imaginary quaternion
public final Quaternion acot()
Returns the principal inverse cotangent of this quaternion q.
The branch cut is (-u, u).
public final Quaternion acot(Quaternion u)
Returns the principal inverse cotangent of this quaternion q.
The branch cut is (-u, u).
On the branch cuts, the imaginary part is a multiple of the imaginary quaternion u.
u
- a non-zero imaginary quaternion
public final Quaternion asinh()
Returns the principal inverse hyperbolic sine of this quaternion q.
The branch cuts are (-u∞, -u) and (u, u∞).
public final Quaternion asinh(Quaternion u)
Returns the principal inverse hyperbolic sine of this quaternion q.
The branch cuts are (-u∞, -u) and (u, u∞).
On the branch cuts, the imaginary part is a multiple of the imaginary quaternion u.
u
- a non-zero imaginary quaternion
public final Quaternion acosh()
Returns the principal inverse hyperbolic cosine of this quaternion q.
The branch cut is (-∞, 1).
public final Quaternion acosh(Quaternion u)
Returns the principal inverse hyperbolic cosine of this quaternion q.
The branch cut is (-∞, 1).
On the branch cuts, the imaginary part is a multiple of the imaginary quaternion u.
u
- a non-zero imaginary quaternion
public final Quaternion atanh()
Returns the principal inverse hyperbolic tangent of this quaternion q.
The branch cuts are (-∞, -1] and [1, ∞).
public final Quaternion atanh(Quaternion u)
Returns the principal inverse hyperbolic tangent of this quaternion q.
The branch cuts are (-∞, -1] and [1, ∞).
On the branch cuts, the imaginary part is a multiple of the imaginary quaternion u.
u
- a non-zero imaginary quaternion
public final Quaternion asech()
Returns the principal inverse hyperbolic secant of this quaternion q.
The branch cuts are (-∞, 0] and (1, ∞).
public final Quaternion asech(Quaternion u)
Returns the principal inverse hyperbolic secant of this quaternion q.
The branch cuts are (-∞, 0] and (1, ∞).
On the branch cuts, the imaginary part is a multiple of the imaginary quaternion u.
u
- a non-zero imaginary quaternion
public final Quaternion acsch()
Returns the principal inverse hyperbolic cosecant of this quaternion q.
The branch cut is (-i, i).
public final Quaternion acsch(Quaternion u)
Returns the principal inverse hyperbolic cosecant of this quaternion q.
The branch cut is (-u, u).
On the branch cuts, the imaginary part is a multiple of the imaginary quaternion u.
u
- a non-zero imaginary quaternion
public final Quaternion acoth()
Returns the principal inverse hyperbolic cotangent of this quaternion q.
The branch cut is [-1, 1].
public final Quaternion acoth(Quaternion u)
Returns the principal inverse hyperbolic cotangent of this quaternion q.
The branch cut is [-1, 1].
On the branch cuts, the imaginary part is a multiple of the imaginary quaternion u.
u
- a non-zero imaginary quaternion
public final Quaternion ceil()
Returns the ceiling of each of the coefficients of this quaternion q.
Math.ceil(double)
public final Quaternion floor()
Returns the floor of each of the coefficients of this quaternion q.
Math.floor(double)
public final Quaternion rint()
Returns each coefficient of the quaternion q rounded to the nearest double equal to an integer.
Math.rint(double)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |