Unfortunately, no. You don't get the same result. For example, let's say the vector is 3 units long and we want to make it 4 units.Originally Posted by Clootie
Scale := Limit / Length := 4 / 3 := 1.3
Scale := (Limit * Limit) / LengthSquare := (4 * 4) / (3 * 3) := 16 / 9 := 1.7
Different scale values. The first one is correct.
Yes. Scaling then normalizing means the scale is a wasted operation.Hmmm, something really wrong with:
[pascal]procedure TVector.Reflection( const normal : TVector; var aReflectionVector : TVector );
begin
...
aReflectionVector.Scale( Length );
aReflectionVector.Normalize; // normalize this vector
...
end;[/pascal]
Bookmarks