- Fixed some issues with leading minus signs. (See #18 and #21)
- Changed the rounding behavior of
round
fromMidpointRounding.ToEven
toMidpointRounding.AwayFromZero
. This means 0.5 goes to 1 instead of 0. - Added the boolean operators ">=", "<=", "!=", and "==". (See #20)
- Fixed a divide-by-zero error with the "/" and ":" operators. They now return zero in such case.
- Only target the .NET Standard (1.0 - 2.0).
- Added
MathParserException
for parser-related exceptions. - Added
random
to the list of predefined functions for getting random numbers within a range:
- 0 arguments: 0 inclusive - 1 exclusive
- 1 argument : 0 inclusive - arg1 exclusive
- 2 arguments: arg1 inclusive - arg2 exclusive
- The variable declarator ("let") may now be changed.
- Fixed an issue where numbers would lose their sign.
- Added
BooleanParser
for parsing and evaluating boolean expressions. - Added
ScriptParser
and other related items for parsing and evaluating "script"-like expressions.
ScriptParser
can handle things like if statements:
let x = 5
0
if (x >= 4)
1
end if
- Added more unit tests.
- Documentation improvements.
- Simplified some internal logic.
- Other small changes and improvements.
dennisvg111 Ctznkane525
- Target the .Net Standard.
- Dropped support of for
decimal
in favor ofdouble
. OperatorList
has been removed andOperatorAction
is nowOperators
.- Added a
CultureInfo
parameter to the constructor for better localization. - Added ln, acos, asin, atan, and ceil to the list of predefined functions.
- Leading zeros may now be omitted before decimal points.
0.5 # Before
.5 # After
- Minor performance improvements.
- Updates to the documentation
- Other small changes and improvements.
- Fixed a problem with functions and unary operators. (#1)
The following would throw an exception:
-sin(5)
- Fixed some internal logic.