From 5f51a2fe3461e1f88e75b0b6959719d25f657ef3 Mon Sep 17 00:00:00 2001
From: Shuxia Ning <NingShuxia0927@outlook.com>
Date: 星期二, 07 一月 2025 17:34:27 +0800
Subject: [PATCH] 曲线模块修改

---
 WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/MapView/Common/Dataset.cs |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/MapView/Common/Dataset.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/MapView/Common/Dataset.cs
index bbfe26f..3e5dd15 100644
--- a/WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/MapView/Common/Dataset.cs
+++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/MapView/Common/Dataset.cs
@@ -1,6 +1,7 @@
-锘縰sing MathNet.Numerics.LinearAlgebra.Double; // 寮曞叆 Math.NET Numerics 搴撹繘琛屽椤瑰紡鎷熷悎
-using MathNet.Numerics;
+锘縰sing MathNet.Numerics;
 using MathNet.Numerics.LinearAlgebra;
+using MathNet.Numerics.LinearAlgebra.Double; // 寮曞叆 Math.NET Numerics 搴撹繘琛屽椤瑰紡鎷熷悎
+using Newtonsoft.Json;
 using System;
 using System.Collections.Generic;
 using System.Drawing;
@@ -10,7 +11,6 @@
 //using System.Windows.Forms.DataVisualization.Charting;
 using Yw.WinFrmUI.Q3d;
 using Yw.WinFrmUI.Q3d;
-using Newtonsoft.Json;
 using Yw.WinFrmUI.Q3d;
 
 namespace Yw.WinFrmUI.Q3d
@@ -51,13 +51,13 @@
                 {
                     case "娴侀噺鎵▼鏇茬嚎":
                         return Color.Blue;
-                        //break;
+                    //break;
                     case "娴侀噺鍔熺巼鏇茬嚎":
                         return Color.Orange;
-                        //break;
+                    //break;
                     case "娴侀噺鏁堢巼鏇茬嚎":
                         return Color.Red;
-                        //break;
+                    //break;
                     default:
                         return Color.Blue;
                 }
@@ -204,7 +204,8 @@
             if (range_X == null)
             {
                 range_X = new DRange(double.MaxValue, double.MinValue);
-                Data.ForEach(p => {
+                Data.ForEach(p =>
+                {
                     if (range_X.Min > p.X) range_X.Min = p.X;
                     if (range_X.Max < p.X) range_X.Max = p.X;
                 });
@@ -283,9 +284,9 @@
                 double b = coefficients[1]; // 涓�娆¢」绯绘暟
                 double c = coefficients[0] - y; // 甯告暟椤圭郴鏁板噺鍘荤粰瀹氱殑 y 鍊�
 
-                
+
                 var roots = MathSolver.Solve(a, b, c);
-                if (roots == null)return ErrNum;
+                if (roots == null) return ErrNum;
                 else return roots.Max();
 
             }
@@ -312,7 +313,7 @@
             //}
             else
             {
-                
+
                 return Solve(y);
             }
         }

--
Gitblit v1.9.3