- Home /
Question by
hexagonius · Aug 04, 2015 at 07:57 AM ·
vector3monodevelopmagnitudenormalized
Vector3 values always precalculated, or just in MonoDevelop?
I stumbled across this while debugging with MonoDevelop. When hovering a Vector3 variable it shows values for magnitude, normalized and sqrMagnitude...
Are these calculated through mono by inspecting the variable, or are these values always available, which would mean they're always computed
screen-shot-2015-08-04-at-095418.png
(21.1 kB)
Comment
Best Answer
Answer by fafase · Aug 04, 2015 at 08:51 AM
They are properties so they most likely get computed when called. Doing a right click-Get Definition does not show more as they are probably done on the C++ side. Monodevelop shows their values as it probably calls for the properties.
It would be surprising and inefficient if all members of a Vector would be computed when the x, y or z is modified.