daily update on 20230111 by nitload youmu

This commit is contained in:
Nitload
2023-01-12 00:33:20 +08:00
parent 6dfc2f8d70
commit e9116ca11b
47 changed files with 190 additions and 98 deletions
@@ -5,10 +5,31 @@ using System.Text;
namespace StgSharp.Geometries
{
public class Rectangle
{
public class Rectangle:IGeometryComplex
{
internal Point _vertex;
internal float _vecX1;
internal float _vecX2;
internal float _vecY1;
internal float _vecY2;
public Rectangle( Line side1, Line side2 )
{
_vecX1 = side1.VecX;
_vecX2 = side2.VecX;
_vecY1 = side1.VecY;
_vecY2 = side2.VecY;
if (_vecX1 * _vecX2 + _vecY1 * _vecY2 !=0 )
{
throw new ArgumentException("Given lines cannot form a rectangle!");
}
}
}
}