Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xjine/unity_expressionparser
ExpressionParser is simple implementation to parse expression into float value with DataTable.
https://github.com/xjine/unity_expressionparser
assets unity
Last synced: 13 days ago
JSON representation
ExpressionParser is simple implementation to parse expression into float value with DataTable.
- Host: GitHub
- URL: https://github.com/xjine/unity_expressionparser
- Owner: XJINE
- Created: 2022-02-28T08:13:59.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-03T08:40:30.000Z (over 2 years ago)
- Last Synced: 2024-03-20T20:12:34.863Z (9 months ago)
- Topics: assets, unity
- Language: C#
- Homepage:
- Size: 24.4 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Unity_ExpressionParser
ExpressionParser is simple implementation to parse expression into float value with ``DataTable``.
```csharp
public static class ExpressionParser
{
private static readonly DataTable DataTable = new ();public static (bool success, float value) Parse(string expression)
{
try { return (true, Convert.ToSingle(DataTable.Compute(expression, ""))); }
catch { return (false, float.NaN); }
}
}
```## Importing
You can use Package Manager or import it directly.
```
https://github.com/XJINE/Unity_ExpressionParser.git?path=Assets/Packages/ExpressionParser
```