Power
Monkey Forums/Monkey Programming/Power
| ||
In BlitzMax I could do this : Print 8 ^ 2 or Print 8 ^ 6 Is there a fast way to do this in Monkey? I can't find it. |
| ||
Print Pow( 8, 2 ) |
| ||
Yep, Thanks! That did it. |
| ||
Sorry to bump such an old thread, but it's relevant as I've just been stumped by the new alternative to ^ as well, which as I found out via search (and this thread) is Pow(). Can someone confirm that this Blitz code: Print(Sqr((a - b)^2 + (c + d)^2)/100) ...becomes this in Monkey: Print(Sqrt(Pow(a - b, a - b)) + (Pow(c - d, c - d)) / 100) I'm having a few issues and just want to make sure I've got it right before I start looking elsewhere. Thanks. |
| ||
Print (Sqrt(Pow(a-b,2)+ Pow(c-d,2))/100) |
| ||
Of course - what an idiot! *sigh* Thanks Jesse |
| ||
Things I learned a long time ago that are probably completely and totally useless, and outdated, nowadays. .. It used to be a teensy bit quicker to do ((a-b)*(a-b)) than (a-b)^2 That's probably irrelevant, though. |