paissaheavyindustries / Triggernometry

Triggernometry is a plugin for Advanced Combat Tracker, intended to extend its built-in trigger system with a variety of different actions and configuration options.
MIT License
253 stars 48 forks source link

Minus sign treatment error #87

Closed MnFeN closed 10 months ago

MnFeN commented 1 year ago

Related with this fixed issue: https://github.com/paissaheavyindustries/Triggernometry/issues/56

variable x = -1

${numeric: 1--1} or ${numeric: 1-${var:x}} gives 2 ${numeric: 1 - -1} or ${numeric: 1 - ${var:x}} gives empty value

Also, functions like arctan2(1, ${var:x}) gives empty value. ${numeric: -1} gives -1, but ${numeric: -1 * 3} or ${numeric: -1*3} both give empty value.

These issues could easily cause problem when writing numeric expressions with negative variables.

MnFeN commented 10 months ago

Fixed in #98