using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IStation.Model
{
///
/// 二元系数换算
///
public class TwiceRatioMatrix : JsonModel
{
//表达式
private const string _expression = "ax²+bx+c";
///
/// 系数A
///
public double RatioA { get; set; } = 0;
///
/// 系数B
///
public double RatioB { get; set; } = 1;
///
/// 系数C
///
public double RatioC { get; set; } = 0;
///
/// 换算
///
public double Matrix(double value)
{
return RatioA * Math.Pow(value, 2) + RatioB * value + RatioC;
}
///
/// 获取表达式
///
public string GetExpression()
{
return _expression;
}
}
}