Object
Vector3d
Vector which contains three doubles.
Vector itself is immutable all public fields are final.
All operations are immutable and return new copy of the vector.
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
n1
public final double n1 -
n2
public final double n2 -
n3
public final double n3
-
-
Constructor Details
-
Vector3d
public Vector3d() -
Vector3d
-
Vector3d
public Vector3d(double n1, double n2, double n3)
-
-
Method Details
-
norm
public double norm()L2 norm, equals to the square root of the dot product of vector with itself. -
normalize
Normalizes the vector, i.e. divides it by its own norm -
mul
Multiply vector with the scalar -
sub
Multiply vector with the scalar -
hashCode
public int hashCode() -
equals
-
toString
-