Function rotateVec2

  • Rotate a vector around a specific point

    Parameters

    • v: Vector2

      The vector to rotate

    • center: Vector2

      The center of the rotate

    • angle: number

      The angle in radians to rotate the vector by

    Returns Vector2

    The newly created vector result