Skip to content

A way to add functions outside of evalmath #3

@jcubic

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)');

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