using System;
using UnityEngine;

namespace VOID.Generic.DynamicValue
{
    [Serializable]
    public class DynamicFormula : DynamicText
    {
        public new float Get()
        {
            ExpressionEvaluator.Evaluate<float>(this, out var result);
            return result;
        }
        
        public static implicit operator float(DynamicFormula dynamicFormula) => dynamicFormula.Get();
    }
}