OpenBOR and PI

O Ilusionista said:
Do OpenBOR accepts Pi (π) in scripts? or Radians?

Not that I know of. You'll have to put the constants in manually.
 
Let me explain what I want to do, maybe there is another way:
I want to make a missile to rotate to always facing a target, using drawmethod.

in mugen, I use this code:
Code:
[State 3]
type = Angleset
trigger1 = p2dist x != 0
value = atan(-(p2dist y-40) / p2dist x) * 180 / pi

I know "atan" is available in OpenBOR, but I would need PI for that.
Any clue about this? Dunno if this or this helps
 
I know what Pi is. :P

What I'm saying is you can input the pi as a constant 3.147... It's nowhere near elegant as a true Pi but will work just as well.
 
Hahaha I wasn't telling you what Pi is, but the c code to calculate it in those examples ;)

I will make some tests and report later.
 
You shouldn't have any issues. Since Pi is constant, it's very rare for any app to bother computing it. Waste of CPU time for no benefit.

Instead they just sub in a named constant behind the scenes. I can guarantee that's what Mugen is doing.

DC
 
Back
Top Bottom