This document is archived and information here might be outdated. Recommended version. |
Scale the vector by the given factor.
[Visual Basic .NET]
Public Sub Scale ( _
ByVal ScaleFactor As Double _
)
[C#]
public void Scale (
double ScaleFactor
);
[C++]
HRESULT Scale(
double ScaleFactor
);
[C++] Parameters ScaleFactor
ScaleFactor is a parameter of type double
Multiplies each component of the Vector by a given Scale factor. If the scale factor is positive, the resulting scaled vector has the same direction as the original vector. If the scale factor is negative, the resulting scaled vector has the opposite direction as the original vector. The Magnitude of the scaled vector = OriginalMagnitude * Abs(ScaleFactor).
Scaling a Vector by 1 / Magnitude effectively Normalizes the vector and results in a unit vector.