Page 1 of 1 1
Topic Options
#45419 - 2003-09-15 10:20 PM Floats
jtokach Offline
Seasoned Scripter
*****

Registered: 2001-11-15
Posts: 513
Loc: PA, USA
[Moderator (Sealeopard): Moved topic from 'Scripts' to 'Starters' forum due to lack of script in body]

Does anyone remember which version of Kix saw the inclusion of floats?

Is there any way to perform floating point math in previous versions? i.e. (5/10)=0.5

[ 17. September 2003, 20:25: Message edited by: sealeopard ]
_________________________
-Jim

...the sort of general malaise that only the genius possess and the insane lament.

Top
#45420 - 2003-09-15 10:28 PM Re: Floats
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Floats came into being with 4.10, I believe.

You could multiply by 100 then divide, but it depends on what you're doing, of course.

Top
#45421 - 2003-09-15 10:58 PM Re: Floats
jtokach Offline
Seasoned Scripter
*****

Registered: 2001-11-15
Posts: 513
Loc: PA, USA
Makes you wonder how we ever managed... I can multiply.

Thanks
_________________________
-Jim

...the sort of general malaise that only the genius possess and the insane lament.

Top
#45422 - 2003-09-15 11:08 PM Re: Floats
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
Wouldn't (5.0/10) give the correct result? Kixtart does a left & right evaluation with the left most part of operation defining the variable type for the result. You have to force it do floating point arithmetic. This is in the manual.
_________________________
Jack

Top
#45423 - 2003-09-16 12:01 AM Re: Floats
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Jack, I think Jim is talking about using a version of KiX (e.g. less than 4.10) that doesn't support floating integers.
Top
#45424 - 2003-09-16 12:52 AM Re: Floats
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
Ah!
_________________________
Jack

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 530 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.052 seconds in which 0.022 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org