This commit is contained in:
2024-08-07 09:16:27 -04:00
parent fdfadd5c7e
commit 5f971cf684
5200 changed files with 731717 additions and 0 deletions

25
engine/ANGLE.CPP Normal file
View File

@@ -0,0 +1,25 @@
#include <engine/angle.hpp>
void Triangle::orderPoints(void)
{
Point minPoint;
WORD minIndex;
for(int ptIndex=0;ptIndex<VectorPoints;ptIndex++)
{
if(!ptIndex){minIndex=ptIndex;minPoint=operator[](ptIndex);}
else if((operator[](ptIndex).y()<minPoint.y())||(operator[](ptIndex).y()==minPoint.y()&&operator[](ptIndex).x()<minPoint.x()))
{
minIndex=ptIndex;
minPoint=operator[](ptIndex);
}
}
operator[](minIndex)=operator[](0);
operator[](0)=minPoint;
if((operator[](1).y()<operator[](2).y())||(operator[](1).y()==operator[](2).y()&&operator[](1).x()<operator[](2).x()))
{
minPoint=operator[](2);
operator[](2)=operator[](1);
operator[](1)=minPoint;
}
}