diff --git a/源代码/CodeBlock/CodeBlock/Code01/CodeFile1.cs b/源代码/CodeBlock/CodeBlock/Code01/CodeFile1.cs index 81c3fcc1..cf323ba5 100644 --- a/源代码/CodeBlock/CodeBlock/Code01/CodeFile1.cs +++ b/源代码/CodeBlock/CodeBlock/Code01/CodeFile1.cs @@ -87,7 +87,7 @@ this.VelocityY = yParaArray ; } 使用秦九韶算法计算X轴位移 -public float XMotion(Exlipse) +public float XMotion(Eclipse) { float xMotion = Eclipse; for(int i=0; i<10; i++) @@ -95,9 +95,22 @@ for(int i=0; i<10; i++) xMotion *= VelovityX[i]; xMotion += VelovityX[i+1]; } +xMotion *= Eclipse; return xMotion; } +使用秦九韶算法计算X轴位移 +public float YMotion(Eclipse) +{ +float yMotion = Eclipse; +for(int i=0; i<10; i++) +{ +yMotion *= VelovityY[i]; +yMotion += VelovityY[i+1]; +} +yMotion *= Eclipse; +return yMotion; +} }