PhpSpreadsheet/tests/PhpSpreadsheetTests/Calculation/Functions/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
..
AbsTest.php Problems Using Builtin PHP Functions Directly As Excel Functions (#1799) 2021-01-26 22:55:06 +01:00
AcosTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
AcoshTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
AcotTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
AcothTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
ArabicTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
AsinTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
AsinhTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
Atan2Test.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
AtanTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
AtanhTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
BaseTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
CeilingMathTest.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
CeilingPreciseTest.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
CeilingTest.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
CombinTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
CosTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
CoshTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
CotTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
CothTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
CscTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
CschTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
DegreesTest.php Problems Using Builtin PHP Functions Directly As Excel Functions (#1799) 2021-01-26 22:55:06 +01:00
EvenTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
ExpTest.php Problems Using Builtin PHP Functions Directly As Excel Functions (#1799) 2021-01-26 22:55:06 +01:00
FactDoubleTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
FactTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
FloorMathTest.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
FloorPreciseTest.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
FloorTest.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
GcdTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
IntTest.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
LcmTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
LnTest.php Problems Using Builtin PHP Functions Directly As Excel Functions (#1799) 2021-01-26 22:55:06 +01:00
Log10Test.php Problems Using Builtin PHP Functions Directly As Excel Functions (#1799) 2021-01-26 22:55:06 +01:00
LogTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
MInverseTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
MMultTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
MRoundTest.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
MdeTermTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
ModTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
MovedFunctionsTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
MultinomialTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
OddTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
PowerTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
ProductTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
QuotientTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
RadiansTest.php Problems Using Builtin PHP Functions Directly As Excel Functions (#1799) 2021-01-26 22:55:06 +01:00
RomanTest.php Support 'Forms' for ROMAN Function (#1828) 2021-02-13 21:23:58 +01:00
RoundDownTest.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
RoundTest.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
RoundUpTest.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00
SecTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
SechTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
SeriesSumTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
SignTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
SinTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
SinhTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
SqrtPiTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
SqrtTest.php Problems Using Builtin PHP Functions Directly As Excel Functions (#1799) 2021-01-26 22:55:06 +01:00
SubTotalTest.php Let's see what Scrutinizer makes of these changes (#1859) 2021-02-18 12:39:24 +01:00
SumIfTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
SumIfsTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
SumProductTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
SumSqTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
SumX2MY2Test.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
SumX2PY2Test.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
SumXMY2Test.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
TanTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
TanhTest.php Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
TruncTest.php ROUND Accepts null, false, and true as First Parameter (#1837) 2021-02-13 21:00:08 +01:00