daily update on 20230111 by nitload youmu
This commit is contained in:
@@ -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!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user