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
5 registered members (Dico, AndrewAMD, TipmyPip, NewbieZorro, Grant), 15,791 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
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