Last active
July 31, 2019 10:46
-
-
Save MThakkar121/31440330cdc43febc178898199a1412a to your computer and use it in GitHub Desktop.
comment difference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Computes an exponent. | |
/// | |
/// @param {number} $base | |
/// The number to multiply by itself. | |
/// @param {integer (unitless)} $exponent | |
/// The number of `$base`s to multiply together. | |
/// @return {number} `$base` to the power of `$exponent`. | |
@function pow($base, $exponent) | |
$result: 1 | |
@for $_ from 1 through $exponent | |
$result: $result * $base | |
@return $result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/// Computes an exponent. /// /// @param {number} $base /// The number to multiply by itself. /// @param {integer (unitless)} $exponent /// The number of
$bases to multiply together. /// @return {number}
$baseto the power of
$exponent. @function pow($base, $exponent) { $result: 1; @for $_ from 1 through $exponent { $result: $result * $base; } @return $result; }