Click or drag to resize

ClusterUtilsGet2DCenterPosition Method

Calculates the centroid of pointers' positions.

Namespace:  TouchScript.Utils
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public static Vector2 Get2DCenterPosition(
	IList<Pointer> pointers
)

Parameters

pointers
Type: System.Collections.GenericIListPointer
List of pointers.

Return Value

Type: Vector2
Centroid of pointers' positions or INVALID_POSITION if cluster contains no points.
See Also