You are here

public static function PHPExcel_Calculation_Engineering::DELTA in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Engineering.php \PHPExcel_Calculation_Engineering::DELTA()

* DELTA * * Tests whether two values are equal. Returns 1 if number1 = number2; returns 0 otherwise. * Use this function to filter a set of values. For example, by summing several DELTA * functions you calculate the count of equal pairs. This function is also known as the * Kronecker Delta function. * * Excel Function: * DELTA(a[,b]) * *

Parameters

float $a The first number.: * @param float $b The second number. If omitted, b is assumed to be zero. * @return int

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Engineering.php, line 2192

Class

PHPExcel_Calculation_Engineering
PHPExcel_Calculation_Engineering

Code

public static function DELTA($a, $b = 0) {
  $a = PHPExcel_Calculation_Functions::flattenSingleValue($a);
  $b = PHPExcel_Calculation_Functions::flattenSingleValue($b);
  return (int) ($a == $b);
}