[This is preliminary documentation and is subject to change.]

Translates point A toward point B by the specified factor of the distance between them.

Namespace: org.critterai
Assembly: cai-util (in cai-util.dll) Version: 0.5.0.0 (0.5.0.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public static Vector3 TranslateToward(
	Vector3 a,
	Vector3 b,
	float factor
)
Public Shared Function TranslateToward ( _
	a As Vector3, _
	b As Vector3, _
	factor As Single _
) As Vector3
public:
static Vector3 TranslateToward(
	Vector3 a, 
	Vector3 b, 
	float factor
)

Parameters

a
Vector3
Point A.
b
Vector3
Point B.
factor
Single
The factor that governs the distance the point is translated from A toward B.

Return Value

The point translated toward point B from point A.

Remarks

Examples:

If the factor is 0.0, then the result will equal A.
If the factor is 0.5, then the result will be the midpoint between A and B.
If the factor is 1.0, then the result will equal B.

See Also