Class Vec3f

java.lang.Object
dev.kosmx.playerAnim.core.util.Vector3<Float>
dev.kosmx.playerAnim.core.util.Vec3f

@Immutable public class Vec3f extends Vector3<Float>
  • Field Details

    • ZERO

      public static final Vec3f ZERO
  • Constructor Details

    • Vec3f

      public Vec3f(float x, float y, float z)
  • Method Details

    • squaredDistanceTo

      public double squaredDistanceTo(Vec3d vec3d)
    • scale

      public Vec3f scale(float scalar)
      Scale the vector
      Parameters:
      scalar - scalar
      Returns:
      scaled vector
    • add

      public Vec3f add(Vec3f other)
      Add two vectors
      Parameters:
      other - other vector
      Returns:
      sum vector
    • dotProduct

      public float dotProduct(Vec3f other)
      Dot product with other vector
      Parameters:
      other - rhs operand
      Returns:
      v
    • crossProduct

      public Vec3f crossProduct(Vec3f other)
      Cross product
      Parameters:
      other - rhs operand
      Returns:
      v
    • subtract

      public Vec3f subtract(Vec3f rhs)
      Subtract a vector from this
      Parameters:
      rhs - rhs operand
      Returns:
      v
    • distanceTo

      public double distanceTo(Vec3d vec3d)