Tremulous Forum

Mods => Modding Center => Topic started by: DarkEnix on March 11, 2008, 08:51:51 am

Title: izzit possible that...
Post by: DarkEnix on March 11, 2008, 08:51:51 am
izzit possible that

use / as a divide sign?

if so , i cant change the size of builds using /3

if not , any sign use as divide?
Title: Re: izzit possible that...
Post by: Amanieu on March 11, 2008, 10:11:33 am
No idea what you're talking about... ::)
Title: Re: izzit possible that...
Post by: DarkEnix on March 11, 2008, 01:02:41 pm
ok , lets say

1.0f              // model scale

can i put it as

1.0f/3              //model scale

if i want it to divide by 3
Title: Re: izzit possible that...
Post by: techhead on March 11, 2008, 11:18:34 pm
.33f
It don't think it will work otherwise. Besides, if you can't do basic arithmetic, you probably shouldn't be coding.
Title: Re: izzit possible that...
Post by: DarkEnix on March 12, 2008, 02:50:17 am
well , you should be saying that the computer have no brains and cant do basic arithmetic

they can juz

1
-
3

or

   .
0.3
Title: Re: izzit possible that...
Post by: techhead on March 12, 2008, 01:18:19 pm
well , you should be saying that the computer have no brains and cant do basic arithmetic

they can juz

1
-
3

or

   .
0.3
Computers cannot do arithmetic on numbers inside lines of code unless you add more lines of code telling it to do the arithmetic. Also, Quake 3 doesn't handle repeating decimals well, it rounds them anyway. Building sizes are in "Quake units" and must be whole numbers, AFAIK. Besides, try putting either of the numbers you used in your last post into a single line of code.
Title: Re: izzit possible that...
Post by: Scam on March 12, 2008, 05:05:14 pm
What you said is valid way to divide. Why don't you try if it works before asking?

1.0f / 3; //Is valid.
----
float f = 1.0f;
f /= 3; //Is valid