News

The second method is a bit simpler—it uses the built in “mag()” function. If you put a vector in there, it will return the magnitude. Go ahead and add this line to the code above and re-run it: ...