Linearly interpolates between vectors v1 and v2 and places the result into this vector: this = (1-alpha)*v1 + alpha*v2
SIVector3.LinearlyInterpolate( SIVector3 in_pVector1, SIVector3 in_pVector2, Double in_dAlpha ); |
SIVector3.LinearlyInterpolate( v1, v2, alpha ); |
Parameter | Type | Description | ||||
---|---|---|---|---|---|---|
v1 | SIVector3 | Operand vector | ||||
v2 | SIVector3 | Operand vector | ||||
alpha | Floating Point value | Scalar interpolator
|
dim v1, v2, v3 ' Create 3D vectors. set v1 = XSIMath.CreateVector3 set v2 = XSIMath.CreateVector3 set v3 = XSIMath.CreateVector3 v1.Set 1.0, 2.0, 3.0 v2.Set 3.0, 5.0, 6.0 alpha = .7 'v3 = (1 - alpha) * v1 + alpha * v2 v3.LinearlyInterpolate v1, v2, alpha |