기술 자료

Unity Engine

Unity Engine

Max(Vector2, Vector2)

Creates a vector that is made from the largest components of two vectors.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public static Vector2 Max(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 largest components of two vectors.

Remarks

Additional Resources: Vector2.Min function.

Examples

using UnityEngine;public class Example : MonoBehaviour{ void Start() { Vector2 a = new Vector2(1, 3); Vector2 b = new Vector2(4, 2); print(Vector2.Max(a, b)); // prints (4.0,3.0) }}