Returning simple math calculation
#1

Hi there,

I was trying to exchange Int to Float in order to get percentage of a specific amount.
Take a look at this stock:

pawn Код:
stock Calculate()
{
    return (70 / 100);
}
By following simple math, it should return 0.7; however, it shows 0.
Am I totally wrong here? Or something else causing it.

NOTE: I tried to use Float as well but it gave me the same result: 0.00000....

Does anyone can give me a hand out here? Much appreciated.
Reply


Messages In This Thread
Returning simple math calculation - by Income - 14.06.2013, 20:01
AW: Returning simple math calculation - by HurtLocker - 14.06.2013, 20:03
Re: AW: Returning simple math calculation - by Income - 14.06.2013, 20:49
AW: Returning simple math calculation - by HurtLocker - 14.06.2013, 20:50
Re: AW: Returning simple math calculation - by Income - 14.06.2013, 21:00
Re: Returning simple math calculation - by Kirollos - 14.06.2013, 21:08
AW: Returning simple math calculation - by HurtLocker - 14.06.2013, 21:44

Forum Jump:


Users browsing this thread: 1 Guest(s)