PhpSpreadsheet/tests/data/Calculation/MathTrig
oleibman 0ce8509a8c
Continue MathTrig Breakup - Trig Functions (#1905)
* Continue MathTrig Breakup - Trig Functions

Continuing the process of breaking MathTrip.php up into smaller classes.
This round takes care of the trig and hyperbolic functions, plus a few others.
- COS, COSH, ACOS, ACOSH
- COT, COTH, ACOT, ACOTH
- CSC, CSCH
- SEC, SECH
- SIN, SINH, ASIN, ASINH
- TAN, TANH, ATAN, ATANH, ATAN2
- EVEN
- ODD
- SIGN

There are no bug fixes in this PR, except that boolean arguments are now
accepted for all these functions, as they are for Excel.
Taking a cue from what has been done in Engineering, the parameter validation
now happens in a routine which issues Exceptions for invalid values;
this simplifies the code in the functions themselves.

Consistent with earlier changes of this nature, the versions in the
MathTrig class remain, with a doc block indicating deprecation,
and a stub call to the new routines.

I think several more iterations will be needed to break up MathTrig completely.
2021-03-13 12:06:30 +01:00
..
ABS.php Problems Using Builtin PHP Functions Directly As Excel Functions (#1799) 2021-01-26 22:55:06 +01:00
ACOS.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
ACOSH.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
ACOT.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
ACOTH.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
ARABIC.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
ASIN.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
ASINH.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
ATAN.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
ATAN2.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
ATANH.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
BASE.php Added support for the base function (#1344) 2020-02-19 20:12:30 +01:00
CEILING.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
CEILINGMATH.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
CEILINGPRECISE.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
COMBIN.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
COS.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
COSH.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
COT.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
COTH.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
CSC.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
CSCH.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
DEGREES.php Problems Using Builtin PHP Functions Directly As Excel Functions (#1799) 2021-01-26 22:55:06 +01:00
EVEN.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
EXP.php Problems Using Builtin PHP Functions Directly As Excel Functions (#1799) 2021-01-26 22:55:06 +01:00
FACT.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
FACTDOUBLE.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
FLOOR.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
FLOORMATH.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
FLOORPRECISE.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
GCD.php style fixes 2017-11-26 23:18:11 +00:00
INT.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
LCM.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
LN.php Problems Using Builtin PHP Functions Directly As Excel Functions (#1799) 2021-01-26 22:55:06 +01:00
LOG.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
LOG10.php Problems Using Builtin PHP Functions Directly As Excel Functions (#1799) 2021-01-26 22:55:06 +01:00
MDETERM.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
MINVERSE.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
MMULT.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
MOD.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
MROUND.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
MULTINOMIAL.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
ODD.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
POWER.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
PRODUCT.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
QUOTIENT.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
RADIANS.php Problems Using Builtin PHP Functions Directly As Excel Functions (#1799) 2021-01-26 22:55:06 +01:00
ROMAN.php Support 'Forms' for ROMAN Function (#1828) 2021-02-13 21:23:58 +01:00
ROUND.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
ROUNDDOWN.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
ROUNDUP.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
SEC.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
SECH.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
SERIESSUM.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
SIGN.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
SIN.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
SINH.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
SQRT.php Problems Using Builtin PHP Functions Directly As Excel Functions (#1799) 2021-01-26 22:55:06 +01:00
SQRTPI.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
SUBTOTAL.php Fix unit tests for PHP 5.6 2018-05-07 11:53:55 +09:00
SUBTOTALHIDDEN.php Let's see what Scrutinizer makes of these changes (#1859) 2021-02-18 12:39:24 +01:00
SUBTOTALNESTED.php Add further new Functions introduced in MS Excel 2013 and 2016 (#608) 2018-07-22 19:17:04 +01:00
SUMIF.php Additional conditionals from math trig (#1885) 2021-02-28 10:24:33 +01:00
SUMIFS.php Additional conditionals from math trig (#1885) 2021-02-28 10:24:33 +01:00
SUMPRODUCT.php Add further new Functions introduced in MS Excel 2013 and 2016 (#608) 2018-07-22 19:17:04 +01:00
SUMSQ.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
SUMX2MY2.php Add further new Functions introduced in MS Excel 2013 and 2016 (#608) 2018-07-22 19:17:04 +01:00
SUMX2PY2.php Add further new Functions introduced in MS Excel 2013 and 2016 (#608) 2018-07-22 19:17:04 +01:00
SUMXMY2.php Add further new Functions introduced in MS Excel 2013 and 2016 (#608) 2018-07-22 19:17:04 +01:00
TAN.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
TANH.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
TRUNC.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00