@sstorsveen/maths - v2.0.1
    Preparing search index...

    Function normFor

    • a = รข

      Normalises the 3-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: Vec3

        a 3-element vector object

      • mag: number

        the magnitude

      Returns Vec3

      a normalised (based on mag)