言語: 日本語
  • C#
  • JS
  • Boo

スクリプト言語

お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。

Mathf.ClosestPowerOfTwo

public static function ClosestPowerOfTwo(value: int): int;

Description

Returns the closest power of two value.

	// prints 8
	Debug.Log(Mathf.ClosestPowerOfTwo(7));
	
	// prints 16
	Debug.Log(Mathf.ClosestPowerOfTwo(19));