Gamestudio Links
Zorro Links
Newest Posts
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (AndrewAMD, EW_bytes), 8,173 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
as using min and max in lite-c #215724
07/13/08 00:38
07/13/08 00:38
Joined: Apr 2006
Posts: 10
Brasil
alves Offline OP
Newbie
alves  Offline OP
Newbie

Joined: Apr 2006
Posts: 10
Brasil

Who knows?


Breve Meu E-BOOK
Desenvolvimento de Jogos Em Lite-C
Iniciante em 3D Game Studio
Meu Portfólio
Re: as using min and max in lite-c [Re: alves] #215728
07/13/08 00:47
07/13/08 00:47
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
minv maxv

or

int myownminfunction (int a, int b) {
if (a < b) {return a;}
else {return b;}
}



Last edited by Joozey; 07/13/08 00:48.

Click and join the 3dgs irc community!
Room: #3dgs
Re: as using min and max in lite-c [Re: Joozey] #215792
07/13/08 13:02
07/13/08 13:02
Joined: Jul 2008
Posts: 894
T
TechMuc Offline
User
TechMuc  Offline
User
T

Joined: Jul 2008
Posts: 894
as joozey said minv/maxv or:

#define min((a),(b)) ((a)<(b))?(a):(b)
#define max(a, b) ( (a)>(b) ? (a) : (b) )

(tough i'm not pretty sure if C-Lite supports "?" and ":" in macros)

Re: as using min and max in lite-c [Re: TechMuc] #215868
07/13/08 19:34
07/13/08 19:34
Joined: Apr 2006
Posts: 10
Brasil
alves Offline OP
Newbie
alves  Offline OP
Newbie

Joined: Apr 2006
Posts: 10
Brasil
Thanks staff...


Breve Meu E-BOOK
Desenvolvimento de Jogos Em Lite-C
Iniciante em 3D Game Studio
Meu Portfólio
Re: as using min and max in lite-c [Re: alves] #215880
07/13/08 20:33
07/13/08 20:33
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
Lite-c does not support the trinary ternary operator at all ^^.

Last edited by Joozey; 07/14/08 19:02.

Click and join the 3dgs irc community!
Room: #3dgs
Re: as using min and max in lite-c [Re: Joozey] #215920
07/14/08 01:13
07/14/08 01:13
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
Ternary not trinary, lol sorry had to...

Is there a reason it doesn't support it, or have conitec just not implemented it. It would save writing a couple of if/else statements.

Re: as using min and max in lite-c [Re: DJBMASTER] #215970
07/14/08 11:24
07/14/08 11:24
Joined: Jul 2008
Posts: 894
T
TechMuc Offline
User
TechMuc  Offline
User
T

Joined: Jul 2008
Posts: 894
foreacst:

Quote:
Debugging local variables. Defining classes. Adding enums, unions, and trinary operators.


so they are planed

Re: as using min and max in lite-c [Re: TechMuc] #216028
07/14/08 19:02
07/14/08 19:02
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
Oh snap, darn english look-alike words!


Click and join the 3dgs irc community!
Room: #3dgs
Re: as using min and max in lite-c [Re: Joozey] #216040
07/14/08 20:15
07/14/08 20:15
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
Quote:
Adding enums, unions, and trinary operators.


so is it trinary or ternary?

Re: as using min and max in lite-c [Re: Joey] #216046
07/14/08 20:46
07/14/08 20:46
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
Ternary according to wiki, but using google, many seem to use trinary (by mistake?). Google self advises to search for ternary though smile.
So I think trinary is not even a word. Derived from the three steps you fuse together perhaps? "if, then, else"

EDIT: tri means three as well.

Last edited by Joozey; 07/14/08 20:48.

Click and join the 3dgs irc community!
Room: #3dgs
Page 1 of 2 1 2

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