Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, AndrewAMD), 14,136 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Something wrong with assignment of float?? #228892
09/23/08 11:35
09/23/08 11:35
Joined: Nov 2007
Posts: 37
L
LavenderSs Offline OP
Newbie
LavenderSs  Offline OP
Newbie
L

Joined: Nov 2007
Posts: 37
Hi, guys!
Here is a little issue for Lite-C. How to assign a floating point number to the 'float' variable? For instance:

float i = 100 / 80 + 100 % 80; //just let i be 1.25

But I see that the result in debug window is 1 rather than 1.25. Do anyone know what's wrong with it??

Re: Something wrong with assignment of float?? [Re: LavenderSs] #228908
09/23/08 13:04
09/23/08 13:04
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
A lot of the numbers being diplayed in the the
debug panel have there decimal fractions trimmed off
for ease reading of display.
The numbers do have a float content but only the
integer portion is displayed.
ie pan = '12.34567' is displayed as '12'.

What variable is you float getting put into and I'll check
this is the case with that variable.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1