Function normalize

  • Divides a vector by its Euclidean length and returns the quotient.

    Parameters

    • v: Vec2

      The vector.

    • Optional dst: Vec2

      vector to hold result. If not passed in a new one is created.

    Returns Vec2

    The normalized vector.