Nivekk / KOS

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

Parenthesis inside functions broken? #134

Closed Benabik closed 11 years ago

Benabik commented 11 years ago

I'm trying to calculate vis-viva for a Hohmann transfer:

set dv to sqrt(mu / r2) * sqrt((2 * r1) / (r1 + r2)).

However this give me unrecognized term "sqrt((2 * r1) / (r1 + r2))". I was able to reduce this to print sqrt((2*2)).

weissel commented 11 years ago

set dv to (mu / r2)^0.5 * ((2 * r1) / (r1 + r2))^0.5. works, so there's at least a workaround.

bazilshep commented 11 years ago

Currently named functions cannot have nested Parens. This includes trig functions, R, etc. This is the same as issue 92.

Benabik commented 11 years ago

Duplicate of #92