SeedV / SeedLang

An embeddable and visualizable scripting engine for .Net and Unity.
https://seedv.github.io/SeedLang/
Apache License 2.0
9 stars 1 forks source link

Implement functions of the math library #218

Closed codingpotato closed 2 years ago

codingpotato commented 2 years ago

Implement #213

Please run math_lib.py for example code of the math library.

dotnet run --project csharp/src/SeedLang.Shell -- -f examples/seedpython/scripts/math_lib.py

Some builtin functions are added as well, like abs, all, any, dir, sum. For example:

a = [True, False, True]
all(a)
any(a)

a = [1, 2, 3]
sum(a)

dir()

import math
dir(math)