PHP Class MathPHP\Functions\Map\Multi

..).
Mostra file Open project: markrogoyski/math-php Class Usage Examples

Public Methods

Method Description
add ( variadic $arrays ) : array Map add against multiple arrays
divide ( variadic $arrays ) : array Map divide against multiple arrays
max ( variadic $arrays ) : array Map max against multiple arrays
min ( variadic $arrays ) : array Map min against multiple arrays
multiply ( variadic $arrays ) : array Map multiply against multiple arrays
subtract ( variadic $arrays ) : array Map subtract against multiple arrays

Private Methods

Method Description
checkArrayLengths ( array $arrays ) : boolean Check that two or more arrays are all the same length

Method Details

add() public static method

[x₁ + y₁, x₂ + y₂, ... ]
public static add ( variadic $arrays ) : array
$arrays variadic Two or more arrays of numbers
return array

divide() public static method

[x₁ / y₁, x₂ / y₂, ... ]
public static divide ( variadic $arrays ) : array
$arrays variadic Two or more arrays of numbers
return array

max() public static method

[max(x₁, y₁), max(x₂, y₂), ... ]
public static max ( variadic $arrays ) : array
$arrays variadic Two or more arrays of numbers
return array

min() public static method

[max(x₁, y₁), max(x₂, y₂), ... ]
public static min ( variadic $arrays ) : array
$arrays variadic Two or more arrays of numbers
return array

multiply() public static method

[x₁ * y₁, x₂ * y₂, ... ]
public static multiply ( variadic $arrays ) : array
$arrays variadic Two or more arrays of numbers
return array

subtract() public static method

[x₁ - y₁, x₂ - y₂, ... ]
public static subtract ( variadic $arrays ) : array
$arrays variadic Two or more arrays of numbers
return array