function_tree 0.2.6 copy "function_tree: ^0.2.6" to clipboard
function_tree: ^0.2.6 copied to clipboard

outdated

A library for parsing and evaluating numerical functions built from strings.

function_tree #

A library for parsing and evaluating numerical functions built from strings.

Usage #

A simple usage example:

import 'package:function_tree/function_tree.dart';
import 'dart:math' show pi;

main() {
  var f = FunctionOfX("1.5 * sin(2 * (x - pi / 3)) + 2");
  print(f(pi));

  var ft = FunctionTree(
    fromExpression: "1.5 * sin(2 * (x - pi / 3)^2) + y",
    withVariableNames: ["x", "y"]);

  print(ft({"x": 1, "y": 2}));
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

66
likes
0
pub points
91%
popularity

Publisher

unverified uploader

A library for parsing and evaluating numerical functions built from strings.

Homepage

License

unknown (LICENSE)

More

Packages that depend on function_tree