private static function PHPExcel_Calculation_Engineering::_cleanComplex in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Engineering.php \PHPExcel_Calculation_Engineering::_cleanComplex()
* Cleans the leading characters in a complex number string * *
Parameters
string $complexNumber The complex number to clean: * @return string The "cleaned" complex number
2 calls to PHPExcel_Calculation_Engineering::_cleanComplex()
- PHPExcel_Calculation_Engineering::IMCONJUGATE in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ Engineering.php - * IMCONJUGATE * * Returns the complex conjugate of a complex number in x + yi or x + yj text format. * * Excel Function: * IMCONJUGATE(complexNumber) * *
- PHPExcel_Calculation_Engineering::IMDIV in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ Engineering.php - * IMDIV * * Returns the quotient of two complex numbers in x + yi or x + yj text format. * * Excel Function: * IMDIV(complexDividend,complexDivisor) * *
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ Engineering.php, line 749
Class
- PHPExcel_Calculation_Engineering
- PHPExcel_Calculation_Engineering
Code
private static function _cleanComplex($complexNumber) {
if ($complexNumber[0] == '+') {
$complexNumber = substr($complexNumber, 1);
}
if ($complexNumber[0] == '0') {
$complexNumber = substr($complexNumber, 1);
}
if ($complexNumber[0] == '.') {
$complexNumber = '0' . $complexNumber;
}
if ($complexNumber[0] == '+') {
$complexNumber = substr($complexNumber, 1);
}
return $complexNumber;
}