"Real constants and functions" E: $e = 2.71828 Pi: $pi = 3.14159 (not always defined) Natural Logarithm: mLow(x) / mLog($e) Base 10 Logarithm: mLog(x) Exponential: mPow($e, x) Exponentiation: mPow(x, y) Exponentiation Modulo: mPow(x, y) % z
"Assertion":Code: [Select]if ( !expression ){ // possibly display an error // error( x ); return; // instead, possibly return a value to parent function to abort as well // return x;}
if ( !expression ){ // possibly display an error // error( x ); return; // instead, possibly return a value to parent function to abort as well // return x;}
This doesn't meet the definition of the assertion on the page.
Assertions are a way of breaking out of code when there is an error or an unexpected input. Some languages throw exceptions and some treat it as a break point.
E: $e = 2.71828Natural Logarithm: mLow(x) / mLog($e)Exponential: mPow($e, x)Exponentiation Modulo: mPow(x, y) % z
Guys, the default mLog() is the natural log, not the base 10 log. You still have to do change of bases though.
function mLog10(%num){ return mLog(%num)/mLog(10);}Or even better:function mLogN(%num, %base){ return mLog(%num)/mLog(%base);}
The "Real constants and functions" task is to demonstrate native language content, not user-made functions.
Is someone adding these? I know I didn't add my code
FileCopy and FileDelete are functions added by Badspot. You should probably remove that.
Well fileCopy i can make easily enough, but how does fileDelete work ?.?
I don't think you can delete a file in blockland any other way.
Well i mean in torque in general. It must be possible, otherwise you couldn't do it in blockland :/
Grab a T3D demo and go look.