Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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
```