You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, that should set the length of the vector to 1. However, it will not succeed in all cases; if the magnitude of the initial vector is too small then I believe the result is unspecified.
Good call -- I believe in that case you'll get a vector with magnitude 0 (since its length is the square root of an empty sum.) There shouldn't be any non-real values in the result since the dimension of the input vector remains the same, so it will still contain zero actual scalar dimensions.
These are edge cases that would be good to document.
When examining
Matrix::normalize
, I have a few questions:
The text was updated successfully, but these errors were encountered: