Function normFor

  • a = รข

    Normalises the two-element vector a based on the given magnitude mag, and stores the result in a.

    This variant is useful if you already know the magnitude

    Parameters

    • a: Vec2

      a 2-element vector object

    • mag: number

      the magnitude

    Returns Vec2

    a normalised (based on mag)

Generated using TypeDoc