# Changelog

## 1.0.9

	- Fixed issue where using a value from Date Time Calculator inside a function such as `floor()` would not work as expected.
	- Improved exception handling of malformed formulas on the frontend.

## 1.0.8

	- Fixed issue where shorthand variables would sometimes behave inconsistently on more complex forms.

## 1.0.7

	- Fixed issue where `!=` operator was not working correctly in conditionals.

## 1.0.6

	- Fixed issue with modulo (`%`) operator not working correctly after submission.

## 1.0.5

	- Fixed issue where shorthands in formulas would not work as expected if multiple formulas used the same shorthand field variable.

## 1.0.4

	- Updated the priority at which we process calculations to allow other plugins to modify the formula first.

## 1.0.3

	- Fixed issue where shorthand variables would stop working if Populate Anything refreshed any fields used in the formula.
	- Fixed issue where shorthand variables could incorrectly replaced by partial matches. As an example, `F43` could be replaced with the value of `F4` if it was processed first.

## 1.0.2

	- Added new [`gpac_should_clean_merge_tag_value`](https://gravitywiz.com/documentation/gpac_should_clean_merge_tag_value) JavaScript filter.

## 1.0.1

	- Fixed issue where exponents did not support raising a number by a power containing a function.
	- Fixed an issue where exponent results between frontend and after submission could be inconsistent when parentheses and functions are used.
	- Added internationalization to strings in Advanced Calculations so they can be translated.

## 1.0

	- Added new `pi()` function that returns π to a precision of 20 decimal places.
	- Fixed issue where the Formula Cheatsheet link was not present in Gravity Forms 2.4. Additionally, the "Validate Formula" button now works as expected with Gravity Forms 2.4.
	- Added support for conditionals with multiple conditions such as `if ( ({Number C:5} < -15) || {Number C:5} > 10 )`.
	- Added support for field variables with modifiers such as `{Nested Form A:4:total}`

## 1.0-beta-1.0

	- Added syntax highlighting/validation support for Date Time Calculator's merge tags such as `{weekdays:}` and `{weekendDays:}`.
	- Updated cheat sheet.
	- Added spaces inside parentheses for function/conditional completions and in the cheatsheet.
	- Added a "Formula Cheatsheet" below the formula editor that opens a modal containing information about how to write the formulas.
	- Added support for shorthand field variables in formulas (e.g. F1 for field 1 and F5.5 for input 5.5)
	- Added new editor to the Calculation Formula field setting that can handle validation and syntax highlighting.
	- Added average() function.
	- Added FV (future value) function. Signature: FV(rate, numberOfPeriods, paymentAmount, presentValue, endOrBeginning)
	- Fixed issue where wrapping function calls in parentheses preceding by a negative symbol would not work.
	- Added support for using exponents/functions inside conditionals
	- Fixed issue where conditionals couldn't contain equal signs after improving security around eval().
	- Improved support for nested function calls.
	- Fixed issue where addition inside parentheses/functions was not being processed.
	- Updated existing log() function which was a natural log to be ln(). log() is now base 10. Additionally, exp() is now an available function.
	- Added "Update URI" to plugin header to improve security.

## 1.0-alpha-1.0

	- Fixed issue where passing parentheses into function parameters or values that are replaced with values containing parentheses would not calculate correctly.
	- Added more functions: sqrt(), round(), ceil(), floor()
	- Fixed decimal numbers breaking formulas.
	- Improved functions to be case-insensitive.

## 0.10.1

	- Fixed issue where Enhanced Calculations would not work if there are multiple forms on the same page using calculations.
	- Added support for elseif's in conditionals.
	- Added support for min and max functions. Example: `max({Number A:1}, {Number B:2}, 5*50)`
	- Fixed issue where backend calculations would not match frontend calculations in some cases.
	- Fixed issues with currency values in conditions.
	- Fixed issue where empty fields could cause errors when evaluating formulas.
