public Real Normalize()
{
Real length = Utility.Sqrt( this.x * this.x + this.y * this.y );
// Will also work for zero-sized vectors, but will change nothing
if ( length > Real.Epsilon )
{
Real inverseLength = 1.0f / length;
this.x *= inverseLength;
this.y *= inverseLength;
}
return length;
}