Math - Magnitude vs Squared Magnitude

In this lecture we look at how to find the magnitude of a vector, using what we already know about the Pythagorean theorem.
We also look at how to save some resources by using the squared magnitude instead.

Which option do you use more often when programming and why?

Responding to the mini-challenge here. One of my main reasons for taking this course was my need to figure out vector math since I’ve found that to be a bit of a challenge when dealing with why I’ve been trying to do in UE4.

I looked at unreal engine docs and for distance I found these

Although, I’m not sure what the difference between Dist and Distance is. I see Dist give Euclidean distance, but haven’t all of our vectors been in Euclidean space, or is there something I’m missing?

Also, UE4 uses size instead of magnitude

@Dendrolis, I’m not familiar enough with EU4 to know if there is a difference between FVector::Distance and FVector::Dist but it looks like they do exactly the same thing. You’ll probably find the latter is just there to match the naming convention for those other distance functions in that list.

“Euclidean distance” is just a fancy way of saying the “straight line distance”, so it’s not doing anything fancy like following the curve of a sphere.