Page 1 of 1

int weight

PostPosted: Tue Jul 31, 2007 3:02 pm
by SnowFear
okay, i try to figure it out every time i see it....
but i just cant!
what is that int weight and how do i use it?

PostPosted: Tue Jul 31, 2007 7:09 pm
by Fuzzy
int weight? where is this?

PostPosted: Tue Jul 31, 2007 9:07 pm
by Jay S.
I think it's this one...
Code: Select all
int weight=1;
 x=((weight-1)*x+view.x)/weight;

...am I right, SnowFear?

This code is from one of the tutorials.

yea

PostPosted: Wed Aug 01, 2007 8:14 pm
by SnowFear
yea =)
whats weight is doing? i know int is a variable!

PostPosted: Wed Aug 01, 2007 8:17 pm
by SnowFear
oh wait, i think i just responded the answer.... weight is just a variable? (not a command?)

ohh

PostPosted: Wed Aug 01, 2007 8:18 pm
by SnowFear
oh wait.... but maybe its not... ARGH I JUST CANT UNDERSTAND IT ><

PostPosted: Thu Aug 02, 2007 12:38 am
by Jay S.
SnowFear wrote:.... weight is just a variable? (not a command?)

Yes, it is just a variable. :)

The "int" stands for "integer." An integer variable can equal whole numbers like 1, 2, 3, and so on. (You might already know that... :P ) In other words, it's saying to create an integer variable called weight and make it equal 1.

Now, as to what it's doing... while I have an idea what, don't ask me; hopefully someone better than me at C will post. :shock: :)

oh

PostPosted: Thu Aug 02, 2007 6:53 am
by SnowFear
oh... thanks ^^
well, i'll try to have more help ^^

PostPosted: Thu Aug 02, 2007 7:17 am
by summer_goth
Paste the code here where weight features and I'll take you through it step by step SnowFear.