-
Notifications
You must be signed in to change notification settings - Fork 777
Open
Description
Describe the bug
As seen in the screenshot below, the math is wrong when doing A - B + C. It seems to interpret it as A - ( B +C ) instead of the normal order of opperations. As a bonus issue (altough not really a problem) there seems to be a weird floating point issue
How to Reproduce*
As seen in the above screenshot, a simple script is enough to reproduce this error.
<?xml version="1.0" encoding="UTF-8"?>
<root BTCPP_format="4"
main_tree_to_execute="test">
<BehaviorTree ID="test">
<Script code="value_1 := 0.0932; value_2:= 0.026; incorrect_result:= value_1 - value_2 + 0.0035; correct_result:= (value_1 - value_2) + 0.0035"/>
</BehaviorTree>`
<?xml version="1.0" encoding="UTF-8"?>
<root BTCPP_format="4"
main_tree_to_execute="test">
<BehaviorTree ID="test">
<Script code="value_1 := 0.0932; value_2:= 0.026; incorrect_result:= value_1 - value_2 + 0.0035; correct_result:= (value_1 - value_2) + 0.0035"/>
</BehaviorTree>
</root>
Metadata
Metadata
Assignees
Labels
No labels