Function normForInto

  • b = รข

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

    This variant is useful if you already know the magnitude

    Parameters

    • a: Vec2

      a 2-element vector object

    • mag: number

      the magnitude

    • b: Vec2

      a 2-element vector in which to store the result

    Returns Vec2

    b as a normalised (based on mag)

Generated using TypeDoc