ドキュメント

Unity Engine

Unity Engine

Min

Creates a vector that is made from the smallest components of two vectors.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

Min(Vector2, Vector2)

Creates a vector that is made from the smallest components of two vectors.
public static Vector2 Min(Vector2 lhs, Vector2 rhs)

Parameters

The first vector to compare.

The second vector to compare.

Returns

Type

Description

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

Remarks

Additional Resources: Vector2.Max function.

Examples

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) }}

Min(Vector2, Vector2)

Creates a vector that is made from the smallest components of two vectors.
public static Vector2 Min(in Vector2 lhs, in Vector2 rhs)

Parameters

The first vector to compare.

The second vector to compare.

Returns

Type

Description

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

Remarks

Additional Resources: Vector2.Max function.

Examples

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) }}