You are here

public static function PHPExcel_Calculation_MathTrig::SQRTPI in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/MathTrig.php \PHPExcel_Calculation_MathTrig::SQRTPI()

* SQRTPI * * Returns the square root of (number * pi). * *

Parameters

float $number Number: * @return float Square Root of Number * Pi

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/MathTrig.php, line 1044

Class

PHPExcel_Calculation_MathTrig
PHPExcel_Calculation_MathTrig

Code

public static function SQRTPI($number) {
  $number = PHPExcel_Calculation_Functions::flattenSingleValue($number);
  if (is_numeric($number)) {
    if ($number < 0) {
      return PHPExcel_Calculation_Functions::NaN();
    }
    return sqrt($number * M_PI);
  }
  return PHPExcel_Calculation_Functions::VALUE();
}