SIVector3.Sub

Description

Subtracts the input vector (v2) from the input vector (v1) and stores the result in this one: this = v1 - v2

Scripting Syntax

SIVector3.Sub( v1, v2 );

Parameters

Parameter Type Description
v1 SIVector3 Operand vector
v2 SIVector3 Operand vector

Examples

VBScript Example

dim v1, v2, v3
' Create 3D vectors.
set v1 = XSIMath.CreateVector3(1.0, 2.0, 3.0)
set v2 = XSIMath.CreateVector3(4.0, 5.0, 6.0)
set v3 = XSIMath.CreateVector3
'v3 = v1 - v2
v3.Sub v1, v2

See Also

SIVector3.Add SIVector3.AddInPlace SIVector3.SubInPlace SIVector3 SIMatrix3 SIMatrix4 SIRotation SITransformation SIQuaternion