Is there a way to treat a Vector as Valid not just 0,0,0 ?
0,0,0 is valid. Can you be more specific?
Just wondering if it can be treated as if it had been set or not, just incase at any point it needs to be 0.
If you need to represent any vector including (0,0,0), then your invalid vector should be infinity (ā,ā,ā). In other words, the invalid vectorās x, y, & z coordinates should all be the largest representable value or a value you donāt intend to reach.
Iām taking your question as āhow to know if a vector has been modified while allowing (0,0,0) as a valid valueā. In that case, you would change the default value to something you donāt intend to have (same as what I said above). Iām assuming your possible values will be unbounded, so you would set the variableās default value to infinity (i.e. the largest number you can use). Then, whenever you need to check if itās changed (i.e. not default), you just check to see if itās equal to infinity. Though, you really only need to test if x is infinity.
Thereās no such thing as an āInvalid Vectorā⦠Maybe you should have a Boolean variable that stores if it has been set or not.
āInvalid Objectsā are references to nothing in memory, or references to objects that are pending kill. As Vectors arenāt stored by reference, and canāt āpend killā, they canāt ever be invalid.
Thanks I see what you mean.