dashh commented on a Page, Math Identifiers  -  Feb 23, 2009

$pi <- a hidden id in mirc return the pi number.

3.14159265358979323846

xD

;- prop's
;         cir ->  with a diameter get a perimeter of a circle (diam)
;         rad -> with a radius get a perimeter of the diameter
;         sqr -> perimeter of a square with a side.
;- no prop -> get any perimeter of a polygon.
;-  - - - - - - - -  by dashh xD

alias perimeter {
  if ( $prop = cir ) { return $calc($1 * $pi) }
  if ( $prop = rad ) { return $calc((2 * $pi) * $1) }
  if ( $prop = sqr ) { return $calc(4 * $1 ) }
  return $calc($replace($remove($1-,+,-),$chr(32),$chr(43)))
}
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.