MathHelper.IsPowerOfTwo Method (Microsoft.Xna.Framework)

Determines if value is powered by two.

Namespace: Microsoft.Xna.Framework
Assembly: MonoGame.Framework (MonoGame.Framework.dll 3.8.0.362)
  • C#
  • VB
  • F#
public static bool IsPowerOfTwo(
	int value
)

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

Parameters

value
Type: System.Int32
A value.

Return Value

Type: System.Boolean
true if value is powered by two; otherwise false.
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop
    
 Windows OpenGL Desktop
    
 Web