Skip to content

A way to add functions outside of evalmath #3

Description

@jcubic

RIght now you can only add functions by calling evaluate, there should be a way to add function like this:

$math = new EvalMath();
$math->fn['square'] = function($x) {
    return $x*$x;
};
$math->evaluate('square(10)');

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions