// pow with non-integer exponents
// feature detection + polyfill

// indirectly checks for eyeglass-math math-pow() existence
@function pow-nonint-ok() {
  // using some well-known input/output
  $test: math-pow(9, 0.5);
    // => 3 when pow works correctly with non-integer exponents
  @return ($test == 3);
}
$pow-nonint-ok: pow-nonint-ok(); // cache result to improve performance

@import '_pow-polyfill';
@function poly-pow($Base, $Exponent) {
  @if($pow-nonint-ok == false) {
    @return math-pow-polyfill($Base, $Exponent); // use polyfill pow
  } @else {
    @return math-pow($Base, $Exponent);          // use eyeglass-math pow
  }
}
