Closed shangchengwen closed 1 year ago
public bool UpdateXYData(int index, float xValue, float yValue) { var flag1 = UpdateData(index, 0, xValue); var flag2 = UpdateData(index, 1, yValue); return flag1 || flag2; }
float转换成double的时候精度会发生变化
建议修改为 public bool UpdateXYData(int index, double xValue, double yValue) 或 decimal t1 = (decimal)xValue; decimal t2 = (decimal)yValue; var flag1 = UpdateData(index, 0, (double)t1); var flag2 = UpdateData(index, 1, (double)t2);
float转换成double的时候精度会发生变化
建议修改为 public bool UpdateXYData(int index, double xValue, double yValue) 或 decimal t1 = (decimal)xValue; decimal t2 = (decimal)yValue; var flag1 = UpdateData(index, 0, (double)t1); var flag2 = UpdateData(index, 1, (double)t2);