Skip to content
0880 edited this page Apr 5, 2024 · 1 revision

Constructors

Curve()

  • Initializes a curve with a default starting point at (0, 0).

Curve(Vector2... points)

  • Initializes a curve with the given points.

Methods

add(Vector2 point)

  • Adds a point to the curve.

remove(Vector2 point)

  • Removes a point from the curve.

remove(int index)

  • Removes the point at the specified index from the curve.

insert(int index, Vector2 point)

  • Inserts a point at the specified index in the curve.

getPoint(int index)

  • Returns the point at the specified index.

valueAt(float t)

  • Returns the value of the curve at the given parameter t.

size()

  • Returns the number of points in the curve.

getPoints()

  • Returns the ArrayList of points defining the curve.

Clone this wiki locally