Interface IVector3D

All Known Implementing Classes:
Vector3D

public interface IVector3D
DO NOT change this interface in any way Your program will be compiled against this interface, so your methods must have exactly these signatures or your program will fail to compile.
  • Method Details

    • dot

      int dot​(Vector3D that)
      Parameters:
      that - another Vector3D
      Returns:
      the dot product of this vector and that.
    • cross

      Vector3D cross​(Vector3D that)
      Parameters:
      that - another Vector3D
      Returns:
      the cross product of this vector and that.
    • scalarMultiply

      Vector3D scalarMultiply​(int scalar)
      Parameters:
      scalar - a integer we are scalar multiplying this vector by
      Returns:
      the that*this
    • add

      Vector3D add​(Vector3D that)
      Parameters:
      that - a Vector3D we are adding this Vector3d to
      Returns:
      this + that
    • subtract

      Vector3D subtract​(Vector3D that)
      Parameters:
      that - a Vector3D we are subtracting this vector from
      Returns:
      this - that
    • magnitude

      double magnitude()
      Returns:
      the length of this vector
    • angleBetween

      double angleBetween​(Vector3D that)
      Parameters:
      that - another vector
      Returns:
      the angle between this and that in radians in [0,π]