Floor: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
m moved Floor() to Floor
imported>StDoodle
No edit summary
Line 5: Line 5:
<p>For example:<pre>int purse_rat_ML = floor( familiar_weight($familiar[109])/2 );
<p>For example:<pre>int purse_rat_ML = floor( familiar_weight($familiar[109])/2 );
print( "Your squeaky little buddy is currently generating "+purse_rat_ML+" ML in aggression from monsters!" );</pre></p>
print( "Your squeaky little buddy is currently generating "+purse_rat_ML+" ML in aggression from monsters!" );</pre></p>
{{Format}}

Revision as of 15:34, 7 March 2010

int floor( float )

Rounds a float variable down to the closest integer beneath it.

For example:

int purse_rat_ML = floor( familiar_weight($familiar[109])/2 );
print( "Your squeaky little buddy is currently generating "+purse_rat_ML+" ML in aggression from monsters!" );

Formatting Needed