What does f mean in the following code:
Code:D3DXMATRIX M;
M(0, 0) = 5.0f; // Set entry ij = 11 to 5.0f.
Printable View
What does f mean in the following code:
Code:D3DXMATRIX M;
M(0, 0) = 5.0f; // Set entry ij = 11 to 5.0f.
Treat 5.0 as a floating point number
It means that you have a matrix and then at collum one row one you set that value to 5.0
I think he's asking about the 'f' in 5.0f. ;)Quote:
Originally posted by NoteMe
It means that you have a matrix and then at collum one row one you set that value to 5.0
Ohh I thought he was swearing...:DQuote:
Originally posted by SLH
I think he's asking about the 'f' in 5.0f. ;)
Then you are correct my friend...:D
Actually it means treat it as a "float", not as a "double", which is the default for floating point constants. Saves a little space in the executable and makes the assignment simpler.
is it really that important to include the f?
is it really that important to worry about conservation of memory in todays computers?
I read they are inventing a RAM that works off no power, (the electrons in the air only) so it is able to store north and south alot easier also allowing for 1 chip to be 1GB of ram....I will find the article and post it.
The problem with this ram so far is 1 spark will **** it.
Is it so hard to add the f? Isn't it worth the single keystroke?
Thanks guys ;)