Definition at line 8 of file Subtraction.php.
◆ execute()
Matrix\Operators\Subtraction::execute |
( |
|
$value | ) |
|
Execute the subtraction.
- Parameters
-
mixed | $value | The matrix or numeric value to subtract from the current base value |
- Exceptions
-
Exception | If the provided argument is not appropriate for the operation |
- Returns
- $this The operation object, allowing multiple subtractions to be chained
Definition at line 17 of file Subtraction.php.
References Matrix\Operators\Subtraction\subtractMatrix(), and Matrix\Operators\Subtraction\subtractScalar().
19 if (is_array($value)) {
20 $value =
new Matrix($value);
23 if (is_object($value) && ($value instanceof
Matrix)) {
25 } elseif (is_numeric($value)) {
29 throw new Exception(
'Invalid argument for subtraction');
subtractScalar($value)
Execute the subtraction for a scalar.
subtractMatrix(Matrix $value)
Execute the subtraction for a matrix.
Class for the creating "special" Matrices.
◆ subtractMatrix()
Matrix\Operators\Subtraction::subtractMatrix |
( |
Matrix |
$value | ) |
|
|
protected |
◆ subtractScalar()
Matrix\Operators\Subtraction::subtractScalar |
( |
|
$value | ) |
|
|
protected |
The documentation for this class was generated from the following file:
- libs/composer/vendor/markbaker/matrix/classes/src/Operators/Subtraction.php