average

Computes the average of all Vector2 instances in the iterable.

The result is a new Vector2 with its x and y components being the average of the corresponding components in the iterable.

Return

A Vector2 representing the average of all vectors in the collection.




Calculates the component-wise average of all Vector4 elements in the iterable.

Return

A Vector4 representing the average of all vectors in the iterable. If the iterable is empty, this will result in a divide-by-zero error.