java.lang.Comparable<BigSurdVec>
public class BigSurdVec extends java.lang.Object implements java.lang.Comparable<BigSurdVec>
Modifier and Type | Field | Description |
---|---|---|
static BigSurdVec |
ONE |
The value of one.
|
static BigSurdVec |
ZERO |
The value of zero.
|
Constructor | Description |
---|---|
BigSurdVec() |
Default ctor, which represents the zero.
|
BigSurdVec(BigSurd a) |
ctor given the value of a BigSurd.
|
BigSurdVec(BigSurd a,
BigSurd b) |
ctor given two values, which (when added) represent this number a+b.
|
Modifier and Type | Method | Description |
---|---|---|
BigSurdVec |
add(BigSurd val) |
Add two vectors algebraically.
|
BigSurdVec |
add(BigSurdVec val) |
Add two vectors algebraically.
|
java.math.BigDecimal |
BigDecimalValue(java.math.MathContext mc) |
Construct an approximate floating point representation
|
int |
compareTo(BigSurdVec oth) |
Compare algebraic value with oth.
|
double |
doubleValue() |
Construct an approximate floating point representation
|
double |
floatValue() |
Construct an approximate floating point representation
|
BigSurdVec |
multiply(BigSurd val) |
Multiply by another square root.
|
BigSurdVec |
negate() |
Compute the negative.
|
protected void |
normalize() |
Combine terms that can be written as a single surd.
|
int |
signum() |
Sign function.
|
BigSurdVec |
sqr() |
Compute the square.
|
BigSurdVec |
subtract(BigSurd val) |
Subtract another number.
|
BigSurdVec |
subtract(BigSurdVec val) |
Subtract another number.
|
java.lang.String |
toString() |
Return a string in the format (number/denom)*()^(1/2).
|
public static BigSurdVec ZERO
public static BigSurdVec ONE
public BigSurdVec()
public BigSurdVec(BigSurd a)
a
- The value to be represented by this vector.protected void normalize()
public int compareTo(BigSurdVec oth)
compareTo
in interface java.lang.Comparable<BigSurdVec>
oth
- The value with which this is to be compared.public int signum()
public java.math.BigDecimal BigDecimalValue(java.math.MathContext mc)
mc
- The intended accuracy of the result.public double doubleValue()
public double floatValue()
public BigSurdVec add(BigSurdVec val)
val
- The value to be added to this.public BigSurdVec add(BigSurd val)
val
- The value to be added to this.public BigSurdVec subtract(BigSurdVec val)
val
- The value to be subtracted from this.public BigSurdVec subtract(BigSurd val)
val
- The value to be subtracted from this.public BigSurdVec negate()
public BigSurdVec sqr()
public BigSurdVec multiply(BigSurd val)
val
- a second number of this type.public java.lang.String toString()
toString
in class java.lang.Object