This document is archived and information here might be outdated.  Recommended version.


IVector.Scale Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Geometry)  

IVector.Scale Method

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

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

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).

Remarks

Scaling a Vector by 1 / Magnitude effectively Normalizes the vector and results in a unit vector.

IVector Scale Example

See Also

IVector Interface