Microsoft DirectX 9.0 SDK Update (October 2004)

ColorOperator.Lerp Method

Language:

Note: This documentation is preliminary and is subject to change.

Creates a color value using linear interpolation.

Definition

Visual Basic .NET Public Shared Function Lerp( _
    ByVal c1 As ColorValue, _
    ByVal c2 As ColorValue, _
    ByVal s As Single _
) As ColorValue
C# public static ColorValue Lerp(
    ColorValue c1,
    ColorValue c2,
    float s
);
Managed C++ public: static ColorValue Lerp(
    ColorValue c1,
    ColorValue c2,
    float s
);
JScript .NET public static function Lerp(
    c1 : ColorValue,
    c2 : ColorValue,
    s : float
) : ColorValue;

Parameters

c1 Microsoft.DirectX.Direct3D.ColorValue. A ColorValue object that specifies the first source color.
c2 Microsoft.DirectX.Direct3D.ColorValue. A ColorValue object that specifies the second source color.
s System.Single. Floating-point value that linearly interpolates between the colors c1 and c2, treating them both as 4-D vectors. There are no limits on this parameter's value.

Return Value

Microsoft.DirectX.Direct3D.ColorValue . A ColorValue object that represents the result of the linear interpolation.

Remarks

If linear interpolation is performed between the colors A and B, and s is 0, the resulting color is A. If s is 1, the resulting color is B.


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center