Object
Vector2f
Vector which contains two floats.
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 float n1 -
n2
public final float n2
-
-
Constructor Details
-
Vector2f
-
Vector2f
public Vector2f(float n1, float n2)
-
-
Method Details
-
norm
public float 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
-