Cove - A Practical Quantum Computer Programming Framework
IsPowerOf Method (PowerOf, TestValue)
NamespacesCove.ClassicalUtilitiesClassicalMathIsPowerOf(Int32, Int32)
Tests to see if TestValue is a (integer) power of PowerOf.
Declaration Syntax
C#Visual BasicVisual C++
public static bool IsPowerOf(
	int PowerOf,
	int TestValue
)
Public Shared Function IsPowerOf ( _
	PowerOf As Integer, _
	TestValue As Integer _
) As Boolean
public:
static bool IsPowerOf(
	int PowerOf, 
	int TestValue
)
Parameters
PowerOf (Int32)
Number to raise to integer powers.
TestValue (Int32)
Value to test to see if it is an integer power
Return Value
True if TestValue is a power of PowerOf.
Examples
If PowerOf = 2, then this function returns true if TestValue is 1, 2, 4, 8, 16,...

Assembly: Cove.ClassicalUtilities (Module: Cove.ClassicalUtilities) Version: 1.0.0.0 (1.0.0.0)