Package dev.kosmx.playerAnim.core.util
Class Vec3f
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd two vectorscrossProduct(Vec3f other) Cross productdoubledistanceTo(Vec3d vec3d) floatdotProduct(Vec3f other) Dot product with other vectorscale(float scalar) Scale the vectordoublesquaredDistanceTo(Vec3d vec3d) Subtract a vector from this
-
Field Details
-
ZERO
-
-
Constructor Details
-
Vec3f
public Vec3f(float x, float y, float z)
-
-
Method Details
-
squaredDistanceTo
-
scale
Scale the vector- Parameters:
scalar- scalar- Returns:
- scaled vector
-
add
Add two vectors- Parameters:
other- other vector- Returns:
- sum vector
-
dotProduct
Dot product with other vector- Parameters:
other- rhs operand- Returns:
- v
-
crossProduct
Cross product- Parameters:
other- rhs operand- Returns:
- v
-
subtract
Subtract a vector from this- Parameters:
rhs- rhs operand- Returns:
- v
-
distanceTo
-