Class Vector2f

java.lang.Object
buildengine.math.vector.Vector2f

public class Vector2f extends Object
2D Vector with float point coordinates
  • Field Details

    • x

      public float x
      The components of the vector
    • y

      public float y
      The components of the vector
  • Constructor Details

    • Vector2f

      public Vector2f()
      Creates a new vector with both components set to 0
    • Vector2f

      public Vector2f(float d)
      Creates a new vector with equal components
      Parameters:
      d - both components value
    • Vector2f

      public Vector2f(Vector2i vector2i)
    • Vector2f

      public Vector2f(Vector2d vector2d)
    • Vector2f

      public Vector2f(float x, float y)
      Creates a new vector with specified components
      Parameters:
      x - the x component
      y - the y component
  • Method Details