Changes between Version 9 and Version 10 of CodingConventionsProposal


Ignore:
Timestamp:
12/25/09 23:04:47 (3 years ago)
Author:
chris
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CodingConventionsProposal

    v9 v10  
    5858} 
    5959}}} 
     60 
     61=== No 'f' on floats with decimals === 
     62It is both redundant and unnecessary to specify the 'f' on values which already contain decimals. 
     63 
     64Here is an example of what '''not''' to do: 
     65{{{ 
     66float d = 0.15f; 
     67float e = 15.0f 
     68}}} 
     69 
     70Here is what you do: 
     71{{{ 
     72float d = 0.15; 
     73float e = 3.; 
     74}}} 
     75 
     76Be sure to simply use an extra '.' (dot) for floating points that are also whole numbers. Though is may not be as readable at 4:00am as "3f", your compiler will catch it and using only the dot notation keeps the code consistent and clean.