java.lang.Object
uk.ac.manchester.tornado.api.types.vectors.Double3
- All Implemented Interfaces:
Serializable,PrimitiveStorage<DoubleBuffer>,TornadoVectorsInterface<DoubleBuffer>
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Double3static Double3* Operations on Double3 vectors.asBuffer()Cast vector into a Double2.static Double3static Double3static Double3static Double3static Double3static doubleDuplicates this vector.static doublefindULPDistance(Double3 a, Double3 b) static Double3static Double3doubleget(int index) double[]getArray()longdoublegetX()doublegetY()doublegetZ()static Double3static booleanstatic booleanisEqualULP(Double3 a, Double3 b, double numULP) static doubleReturns the vector length e.g.voidloadFromBuffer(DoubleBuffer buffer) static doublestatic Double3static doublestatic Double3static Double3static Double3static Double3static Double3static Double3scaleByInverse(Double3 a, double value) voidset(int index, double value) voidvoidsetS0(double value) voidsetS1(double value) voidsetS2(double value) voidsetX(double value) voidsetY(double value) voidsetZ(double value) intsize()static Double3static Double3static Double3double[]toArray()toString()
-
Field Details
-
TYPE
-
-
Constructor Details
-
Double3
public Double3() -
Double3
public Double3(double x, double y, double z)
-
-
Method Details
-
add
* Operations on Double3 vectors. -
sub
-
div
-
mult
-
min
-
max
-
cross
-
add
-
sub
-
mult
-
div
-
inc
-
dec
-
scaleByInverse
-
scale
-
sqrt
-
floor
-
fract
-
clamp
-
normalise
-
min
-
max
-
dot
-
length
Returns the vector length e.g. the sqrt of all elements squared.- Returns:
-
invalid reference
double
-
isEqual
-
isEqualULP
-
findULPDistance
-
getArray
public double[] getArray() -
get
public double get(int index) -
set
public void set(int index, double value) -
set
-
getX
public double getX() -
setX
public void setX(double value) -
getY
public double getY() -
setY
public void setY(double value) -
getZ
public double getZ() -
setZ
public void setZ(double value) -
setS0
public void setS0(double value) -
setS1
public void setS1(double value) -
setS2
public void setS2(double value) -
duplicate
Duplicates this vector.- Returns:
Double3
-
toString
-
toString
-
asDouble2
Cast vector into a Double2.- Returns:
Double2
-
loadFromBuffer
- Specified by:
loadFromBufferin interfacePrimitiveStorage<DoubleBuffer>
-
asBuffer
- Specified by:
asBufferin interfacePrimitiveStorage<DoubleBuffer>
-
size
public int size()- Specified by:
sizein interfacePrimitiveStorage<DoubleBuffer>
-
toArray
public double[] toArray() -
getNumBytes
public long getNumBytes()- Specified by:
getNumBytesin interfaceTornadoVectorsInterface<DoubleBuffer>
-