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

Scales the vector to the specified length. (Costly method!)

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 Vector2 ScaleTo(
	Vector2 v,
	float length
)
Public Shared Function ScaleTo ( _
	v As Vector2, _
	length As Single _
) As Vector2
public:
static Vector2 ScaleTo(
	Vector2 v, 
	float length
)

Parameters

v
Vector2
A vector.
length
Single
The length to scale the vector to.

Return Value

A vector scaled to the specified length.

See Also