Package dev.kosmx.playerAnim.core.util
Class Vec3d
Three-dimensional double vector
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd two vectorscrossProduct(Vec3d other) Cross productdoubledistanceTo(Vec3d vec3d) doubledotProduct(Vec3d other) Dot product with other vectorscale(double scalar) Scale the vectordoublesquaredDistanceTo(Vec3d vec3d) Subtract a vector from this
-
Constructor Details
-
Vec3d
-
-
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
-