What should Vector::UNIT be?

In the master branch, Vector::UNIT is defined as the zero-vector (0, 0),
which is obviously not correct. But I’m unsure, what value would be correct.

According to this, a unit vector is any vector with length 1, so there would be many valid values. In terms of what constants would be useful I would suggest providing the unit vectors of the standard basis:

pub const UNIT_X: Self = Self::new(1.0, 0.0);
pub const UNIT_Y: Self = Self::new(0.0, 1.0);  

This would allow expressions like Vector::UNIT_X * 4.0 for a vector 4 units in the x direction.

Any other suggestions? Maybe Vector doesn’t need any constants outside ZERO?

What’s your interest in this particular piece? To me it looks like a bad copy-paste for a constant that is not even being used yet. It will probably be fixed when the author starts using it.

I realize that this is not very impactful, but it’s something I stumbled across and thought it shouldn’t go unmentioned.

Ah, this is a leftover from a redesign I did a long time ago. Let’s just get rid of it.