Mathematics question
#6

i want to mention that dividing any number by another number smaller than 1, results in multiplying by a large number:
A=1 / 0.07
where 0.07, as divisor, is the same as using a multiplier of 14.2
A=1 * 14.2
so change
pawn Код:
tax = plStats [ u ] [ LumberjackWage ] + plStats [ u ] [ QuarryworkerWage ] / 0.07,
to
pawn Код:
tax = plStats [ u ] [ LumberjackWage ] + plStats [ u ] [ QuarryworkerWage ] * 0.07,
or incase you want the base amount including taxes, then simply add the 100 percent base as 1.00 added to the tax rate float:
pawn Код:
tax = plStats [ u ] [ LumberjackWage ] + plStats [ u ] [ QuarryworkerWage ] * 1.07,
... this way you avoid a "divsion by zero" error when (if?) your taxes are set to 0
Reply


Messages In This Thread
Mathematics question - by 2KY - 25.09.2012, 20:51
Re : Mathematics question - by Varkoll_ - 25.09.2012, 21:02
Re: Mathematics question - by 2KY - 25.09.2012, 21:05
Re: Mathematics question - by vIBIENNYx - 25.09.2012, 21:10
Re : Mathematics question - by Varkoll_ - 25.09.2012, 21:14
Re: Mathematics question - by Babul - 25.09.2012, 21:28
Re : Mathematics question - by Varkoll_ - 25.09.2012, 21:31

Forum Jump:


Users browsing this thread: 1 Guest(s)