Nivekk / KOS

Fully programmable autopilot mod for KSP.
Other
80 stars 30 forks source link

Expressions could not handle float in arithmetric operations #218

Closed palaslet closed 10 years ago

palaslet commented 10 years ago

A feature allowing for terms of type STRUCTURE to return float directly into the arithmetic interpreter. The interpreter only supported numeric values of type double.

Eg. TARGET:DISTANCE returned float type.

WAIT UNTIL TARGET:DISTANCE < 10000. Would then fail because the float value wasn't cast to double.

Instead of just changing the return value of TARGET:DISTANCE, I added support for more numeric types in expressions.

palaslet commented 10 years ago

This would probably fix https://github.com/Nivekk/KOS/issues/212 as well.