1@function ms-calc($Value, $Base: $ms-base, $Ratio: $ms-ratio) { 2 3 // If pow exists use it. 4 // It supports non-interger values! 5 @if $MS-pow-exists { 6 7 // The formula for figuring out modular scales is: 8 // (r^v)*b 9 @return pow($Ratio, $Value) * $Base; 10 } 11 12 // If not, use ms-pow(). 13 // Not as fast or capable of non-integer exponents. 14 @else { 15 @return ms-pow($Ratio, $Value) * $Base; 16 } 17}