Exponentiation
by gabriel L.B. · in Torque X 2D · 06/04/2011 (3:11 pm) · 2 replies
hey !
im working on a platformer game and i want to make an acceleration effect to my player ...
so i want to use an Exponentiation to my ''speed''variable ...
im using editPlus and i want to know how can i make Exponentiation ... i tried '' ^ '' and i also tied the '' x '' in exponent form ( like small at the top right )
but it doesnt work .. do u have a clue for me ?? :)
thanks !
im working on a platformer game and i want to make an acceleration effect to my player ...
so i want to use an Exponentiation to my ''speed''variable ...
im using editPlus and i want to know how can i make Exponentiation ... i tried '' ^ '' and i also tied the '' x '' in exponent form ( like small at the top right )
but it doesnt work .. do u have a clue for me ?? :)
thanks !
#2
mPow( val , power )
so If I remember you can do 2^7 by
$powerVar =mPow(2,7)
there's more info in the documentation here:
http://tdn.garagegames.com/wiki/TorqueScript_Console_Functions_21
06/06/2011 (7:02 pm)
there's an exponant function I've used. I think its:mPow( val , power )
so If I remember you can do 2^7 by
$powerVar =mPow(2,7)
there's more info in the documentation here:
http://tdn.garagegames.com/wiki/TorqueScript_Console_Functions_21
Torque 3D Owner Aaron Scovel
Here's an example from one of my projects