LazyBot/Assets/Scripts/Utility/UtilityData.cs
/// <summary>
/// Returns a specified number raised to the specified power.
/// </summary>
/// <param name="bas">Number to be raised to a power.</param>
/// <param name="exp">Number that specifies a power.</param>
/// <returns>Raised number.</returns>
Returns a specified number raised to the specified power.
Returns a specified number raised to the specified power .
public static int Pow(this int bas, int exp)
        {
            return Enumerable
                  .Repeat(bas, exp)
                  .Aggregate(1, (a, b) => a * b);
        }
public static int Pow ( this int bas , int exp ) { return Enumerable . Repeat ( bas , exp ) . Aggregate ( 1 , ( a , b ) => a * b ) ; }
Returns a specified number raised to the specified power.
Returns a specified number raised to the specified power .
None
int
this
exp
int
Number that specifies a power.
Number that specifies a power .
bas
Number to be raised to a power.
Number to be raised to a power .