Vector2.Min

Declaration

public static Vector2 Min(Vector2 lhs, Vector2 rhs);

Description

Returns a vector that is made from the smallest components of two vectors.

Additional resources: Max function.

using UnityEngine;

public class Example : MonoBehaviour { void Start() { Vector2 a = new Vector2(1, 3); Vector2 b = new Vector2(4, 2); print(Vector2.Min(a, b)); // prints (1.0,2.0) } }

Did you find this page useful? Please give it a rating: