Constructor and Description |
---|
Vector1Int()
Creates a new vector.
|
Vector1Int(int value)
Creates a new Vector1int.
|
Modifier and Type | Method and Description |
---|---|
IVector1 |
add(IVector1 vector)
Adds another vector to this vector, adding individual components.
|
IVector1 |
cbrt()
Calculate the cube root.
|
java.lang.Object |
clone()
Generates a deep clone of the vector.
|
IVector1 |
copy()
Makes a copy of the vector without using the complex clone interface.
|
IVector2 |
createVector2(IVector1 sec)
Create a vector2 from this and another vector.
|
boolean |
equals(IVector1 vector)
Compares the vector to another vector.
|
boolean |
equals(java.lang.Object obj)
Compares the vector to an object
|
java.math.BigDecimal |
getAsBigDecimal()
Returns the vector as BigDecimal.
|
double |
getAsDouble()
Returns the vector as double.
|
float |
getAsFloat()
Returns the vector as float.
|
int |
getAsInteger()
Returns the vector as integer.
|
long |
getAsLong()
Returns the vector as long.
|
IVector1 |
getDistance(IVector1 vector)
Returns the distance to another vector
|
boolean |
greater(IVector1 vector)
Tests if the vector is greater than another vector.
|
int |
hashCode()
Compute the hash code.
|
boolean |
less(IVector1 vector)
Tests if the vector is less than another vector.
|
IVector1 |
mod(IVector1 mod)
Calculate the modulo.
|
IVector1 |
multiply(IVector1 vector)
Performs a multiplication on the vector.
|
IVector1 |
negate()
Negates the vector by negating its components.
|
void |
setAsInteger(int x) |
IVector1 |
sqrt()
Calculate the square root.
|
IVector1 |
subtract(IVector1 vector)
Subtracts another vector to this vector, subtracting individual components.
|
java.lang.String |
toString() |
IVector1 |
zero()
Sets the vector component to zero.
|
public static final IVector1 ZERO
public Vector1Int(int value)
value
- vector valuepublic Vector1Int()
public IVector1 add(IVector1 vector)
public IVector1 subtract(IVector1 vector)
public IVector1 zero()
public IVector1 negate()
public IVector1 sqrt()
public IVector1 getDistance(IVector1 vector)
getDistance
in interface IVector1
vector
- other vectorpublic int getAsInteger()
getAsInteger
in interface IVector1
public void setAsInteger(int x)
public long getAsLong()
public float getAsFloat()
getAsFloat
in interface IVector1
public double getAsDouble()
getAsDouble
in interface IVector1
public java.math.BigDecimal getAsBigDecimal()
getAsBigDecimal
in interface IVector1
public IVector1 copy()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
public boolean equals(java.lang.Object obj)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(IVector1 vector)
public boolean greater(IVector1 vector)
public boolean less(IVector1 vector)
public IVector2 createVector2(IVector1 sec)
createVector2
in interface IVector1
sec
- The second vector.public java.lang.String toString()
toString
in class java.lang.Object