Version: 5.3 (switch to 5.4b)
言語English
  • C#
  • JS

スクリプト言語

好きな言語を選択してください。選択した言語でスクリプトコードが表示されます。

Mathf.Abs

マニュアルに切り替える
public static float Abs(float f);

パラメーター

説明

/f/の絶対値を返す。

	// prints 10.5
	Debug.Log(Mathf.Abs(-10.5));

public static int Abs(int value);

パラメーター

説明

/value/の絶対値を返す。

	// prints 10
	Debug.Log(Mathf.Abs(-10));