namespace WS
{
    /// <summary>float变量</summary>
    public class VarFloat : Variable<float>
    {
        /// <summary>分配一个对象</summary>
        public static VarFloat Alloc()
        {
            VarFloat var = new VarFloat();
            var.Value = 0;
            return var;
        }

        /// <summary>分配一个对象</summary>
        /// <param name="value">初始值</param>
        public static VarFloat Alloc(float value)
        {
            VarFloat var = Alloc();
            var.Value = value;
            return var;
        }

        /// <summary>VarFloat -> float</summary>
        public static implicit operator float(VarFloat value)
        {
            return value.Value;
        }
    }
}