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

    Function sqrMag

    • Calculates the square of the magnitude of the two-element vector a

      (This is cheaper than calculating the actual magnitude and is useful e.g. when comparing two vectors)

      Parameters

      • a: Vec2

        a 2-element vector object

      Returns number

      |a|²