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|²

Generated using TypeDoc