Function rotate

  • Rotate a 2D vector

    Type Parameters

    Parameters

    • a: BaseArgType

      The vec2 point to rotate

    • b: BaseArgType

      The origin of the rotation

    • rad: number

      The angle of rotation in radians

    • Optional dst: T

    Returns T

    the rotated vector