int weight

Non-platform specific questions.

int weight

Postby SnowFear » Tue Jul 31, 2007 3:02 pm

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?
Meow...
User avatar
SnowFear
 
Posts: 54
Joined: Thu Feb 15, 2007 4:29 pm
Score: 3 Give a positive score

Postby Fuzzy » Tue Jul 31, 2007 7:09 pm

int weight? where is this?
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Postby Jay S. » Tue Jul 31, 2007 9:07 pm

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.
User avatar
Jay S.
 
Posts: 118
Joined: Thu Apr 26, 2007 6:51 pm
Location: My computer desk. :P
Score: 9 Give a positive score

yea

Postby SnowFear » Wed Aug 01, 2007 8:14 pm

yea =)
whats weight is doing? i know int is a variable!
Meow...
User avatar
SnowFear
 
Posts: 54
Joined: Thu Feb 15, 2007 4:29 pm
Score: 3 Give a positive score

Postby SnowFear » Wed Aug 01, 2007 8:17 pm

oh wait, i think i just responded the answer.... weight is just a variable? (not a command?)
Meow...
User avatar
SnowFear
 
Posts: 54
Joined: Thu Feb 15, 2007 4:29 pm
Score: 3 Give a positive score

ohh

Postby SnowFear » Wed Aug 01, 2007 8:18 pm

oh wait.... but maybe its not... ARGH I JUST CANT UNDERSTAND IT ><
Meow...
User avatar
SnowFear
 
Posts: 54
Joined: Thu Feb 15, 2007 4:29 pm
Score: 3 Give a positive score

Postby Jay S. » Thu Aug 02, 2007 12:38 am

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: :)
User avatar
Jay S.
 
Posts: 118
Joined: Thu Apr 26, 2007 6:51 pm
Location: My computer desk. :P
Score: 9 Give a positive score

oh

Postby SnowFear » Thu Aug 02, 2007 6:53 am

oh... thanks ^^
well, i'll try to have more help ^^
Meow...
User avatar
SnowFear
 
Posts: 54
Joined: Thu Feb 15, 2007 4:29 pm
Score: 3 Give a positive score

Postby summer_goth » Thu Aug 02, 2007 7:17 am

Paste the code here where weight features and I'll take you through it step by step SnowFear.
User avatar
summer_goth
 
Posts: 153
Joined: Fri Jun 22, 2007 8:07 am
Location: South Africa
Score: 5 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron