Assembla home | Assembla project page
 

Changeset 54

Show
Ignore:
Timestamp:
02/11/08 23:35:56 (10 months ago)
Author:
Seldaek
Message:

* tiny fix in math

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Phergie/Event/Handler/Math.php

    r15 r54  
    3333        if (substr($event->getArgument(1), 0, 5) === 'math ' || substr($event->getArgument(1), 0, 5) === 'calc ') { 
    3434                // Get equation 
    35                 $equation = strtolower(substr($event->getArgument(1), 5)); 
     35                $equation = substr($event->getArgument(1), 5); 
    3636                // Replace constants 
    37                         $equation = str_replace(array('pi()', 'pi', 'chucknorris', 'inf', 'e'), array('M_PI', 'M_PI', 1e10000, 'INF', 'M_E'), $equation); 
     37                        $equation = str_ireplace(array('pi', 'M_PI()', 'chucknorris', 'inf', ' e '), array('M_PI', 'M_PI', 1e10000, 'INF', ' M_E '), $equation); 
    3838                        $equationSrc = $equation; 
    3939