Converting ft. into km.
#1

So, this is the variable which calculates the distance in ft.

pawn Код:
dist = floatsqroot(floatpower(floatabs(floatsub(PosX[i],X)),2)+floatpower(floatabs(floatsub(PosY[i],Y)),2)+floatpower(floatabs(floatsub(PosZ[i],Z)),2));
For example it gives me 10ft and i saw that 1ft is 0.0003048 KM.

So i guess i must do:

10 * 0.0003048 ?
Reply
#2

pawn Код:
return floatround(dist * 0.0003048);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)