Top

$roundint(N).P <-- N rounded to nearest P


mIRC Code
+ 0 likes
Please Register to submit score.
Average Score  4.0
Scores Submitted  1
Date Added  Jun 13, 2008
Last Updated  Jun 13, 2008
Tags  custom  identifier  math  mirc  numbers  round  rounding 
  Bookmark and Share

Introduction

The following is a rounding function for whole numbers, not decimals as $round() does.

; Usage: $roundint(Number).P <---- Returns Number rounded to the nearest prop
; 'P' above must be a multiple of 10 and positive
; Example: $roundint(77).100 <--- returns 100
; Example II: $roundint(23).100 <--- returns 0

Grab the Code

Comments

  (3)  RSS
BlueThen
Comments: 332
 
mIRC Snippet:  $roundint(N).P <-- N rounded to nearest P
Posted on Jun 13, 2008 1:36 pm
Pretty useful, seeing as how $round can only round to ones. (although you could just take your number, multiply it by 0.1, then use $round on it, then multiply it by 10).
EL
Comments: 1,400
 
mIRC Snippet:  $roundint(N).P <-- N rounded to nearest P
Posted on Jun 13, 2008 1:50 pm
eeek math i ll pass =\ looks good tho.`-.-ยด
vaseline28
Comments: 154
 
mIRC Snippet:  $roundint(N).P <-- N rounded to nearest P
Posted on Jun 14, 2008 12:52 am
Yep BlueThen, I considered that, but figured this was more useful! Thanks both.
Maths is not my favorite either, but I try!

Please Register or Login to start posting comments.
Bottom