java.lang.Object
uk.ac.manchester.tornado.api.types.vectors.Double4
- All Implemented Interfaces:
Serializable,PrimitiveStorage<DoubleBuffer>,TornadoVectorsInterface<DoubleBuffer>
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Double4static Double4* Operations on Double4 vectors.asBuffer()Cast vector into a Double2.static Double4static Double4static Double4static Double4static doubleDuplicates this vector.voidfill(double value) static Double4static Double4doubleget(int index) double[]getArray()getHigh()getLow()longdoublegetW()doublegetX()doublegetY()doublegetZ()static Double4static booleanstatic doubleReturns the vector length e.g.voidloadFromBuffer(DoubleBuffer buffer) static doublestatic Double4static doublestatic Double4static Double4static Double4static voidstatic Double4static Double4scaleByInverse(Double4 a, double value) voidset(int index, double value) voidvoidsetW(double value) voidsetX(double value) voidsetY(double value) voidsetZ(double value) intsize()static Double4static Double4static Double4double[]toArray()toString()
-
Field Details
-
TYPE
-
-
Constructor Details
-
Double4
public Double4() -
Double4
public Double4(double x, double y, double z, double w)
-
-
Method Details
-
add
* Operations on Double4 vectors. -
sub
-
div
-
mult
-
min
-
max
-
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
-
get
public double get(int index) -
set
public void set(int index, double value) -
getArray
public double[] getArray() -
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) -
getW
public double getW() -
setW
public void setW(double value) -
duplicate
Duplicates this vector.- Returns:
Double4
-
toString
-
toString
-
asDouble2
Cast vector into a Double2.- Returns:
Double2
-
asDouble3
-
getLow
-
getHigh
-
loadFromBuffer
- Specified by:
loadFromBufferin interfacePrimitiveStorage<DoubleBuffer>
-
asBuffer
- Specified by:
asBufferin interfacePrimitiveStorage<DoubleBuffer>
-
size
public int size()- Specified by:
sizein interfacePrimitiveStorage<DoubleBuffer>
-
fill
public void fill(double value) -
toArray
public double[] toArray() -
getNumBytes
public long getNumBytes()- Specified by:
getNumBytesin interfaceTornadoVectorsInterface<DoubleBuffer>
-