Daily update on 20230204 by nitload youmu, pow func added

This commit is contained in:
Nitload
2023-02-05 09:41:05 +08:00
parent f75fcacc0d
commit 19a1420b2f
42 changed files with 202 additions and 69 deletions
+3 -10
View File
@@ -1,5 +1,4 @@
using StgSharp;
using System;
using System;
using System.Collections.Generic;
using System.Text;
@@ -17,15 +16,9 @@ namespace StgSharp
get { return _referencePoint; }
}
public float VecX
{
get { return _vecX; }
}
float IGeometry.ExpressionX => throw new NotImplementedException();
public float VecY
{
get { return _vecY; }
}
float IGeometry.ExpressionY => throw new NotImplementedException();
ContainerNode<INode> INode.ID
{
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace StgSharp
{
public delegate float ExpressionHandler
(
Counter<uint> tickCounter,
float beginRange,
float endRange
);
}
@@ -14,12 +14,12 @@ namespace StgSharp
get;
}
public float VecX
internal float ExpressionX
{
get;
}
public float VecY
internal float ExpressionY
{
get;
}
+5 -9
View File
@@ -18,21 +18,17 @@ namespace StgSharp
get { return _referencePoint; }
}
public float VecX
{
get { return _vecX; }
}
public float VecY
{
get { return _vecY; }
}
ContainerNode<INode> INode.ID
{
get { return _id; }
}
float IGeometry.ExpressionX => throw new NotImplementedException();
float IGeometry.ExpressionY => throw new NotImplementedException();
public Line( Point referencePoint, float vecX, float vecY)
{
_referencePoint = referencePoint;
+3 -16
View File
@@ -5,7 +5,7 @@ using System.Text;
namespace StgSharp
{
public class Triangle : IGeometry
public class Triangle
{
internal ContainerNode<INode> _id;
@@ -29,10 +29,7 @@ namespace StgSharp
get { return _referencePoint.Y; }
}
ContainerNode<INode> INode.ID
{
get { return _id; }
}
public float SetArrayX(Counter<uint> tickCounter)
{
@@ -44,16 +41,6 @@ namespace StgSharp
return _setArrayYHandler.Invoke(tickCounter);
}
void INode.setID<T>(ContainerNode<T> id)
{
if (id == null)
{
_id = id as ContainerNode<INode>;
}
else
{
throw new ArgumentNullException("Cannot set id teice!");
}
}
}
}
+1 -1
View File
@@ -47,7 +47,7 @@ namespace StgSharp
}
else
{
throw new ArgumentNullException("Cannot set id teice!");
throw new ArgumentException("Cannot set id twice!");
}
}
}