ドキュメント

Unity Engine

Unity Engine

PointToNormalized(Rect, Vector2)

Returns the normalized coordinates corresponding to the point.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public static Vector2 PointToNormalized(Rect rectangle, Vector2 point)

Parameters

rectangle

Rectangle to get normalized coordinates inside.

point

A point inside the rectangle to get normalized coordinates for.

Returns

Type

Description

Vector2

Remarks

The returned Vector2 is in the range 0 to 1 with values more 1 or less than zero clamped.