Name | magSq() |
---|---|
Examples |
v = PVector(20.0, 30.0, 40.0) m = v.magSq() print(m) # Prints "2900.0" |
Description | Calculates the magnitude (length) of the vector, squared. This method is often used to improve performance since, unlike mag(), it does not require a sqrt() operation. |
Related |
mag() |
Updated on Tue Feb 27 14:07:12 2024.
If you see any errors or have comments, please let us know.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License