This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests (PHP) | |
on: [push] | |
jobs: | |
tests: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE policymap [ | |
<!ELEMENT policymap (policy)+> | |
<!ELEMENT policy (#PCDATA)> | |
<!ATTLIST policy domain (delegate|coder|filter|path|resource) #IMPLIED> | |
<!ATTLIST policy name CDATA #IMPLIED> | |
<!ATTLIST policy rights CDATA #IMPLIED> | |
<!ATTLIST policy pattern CDATA #IMPLIED> | |
<!ATTLIST policy value CDATA #IMPLIED> | |
]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void DrawTriangular::calculatePoints(Vector3D point1, Vector3D point2, Vector3D point3, img::Color color){ | |
double oneZ = 1/(3*point1.z) + 1/(3*point2.z) + 1/(3*point3.z); | |
//project those points | |
this->projectPoint(point1); | |
this->projectPoint(point2); | |
this->projectPoint(point3); | |
double xG = (point1.x + point2.x + point3.x)/3; | |
double yG = (point1.y + point2.y + point3.y)/3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//project those points | |
this->projectPoint(point1); | |
this->projectPoint(point2); | |
this->projectPoint(point3); | |
int yMin = roundToInt(std::min(std::min(point1.y, point2.y), point3.y) + 0.5); | |
int yMax = roundToInt(std::max(std::max(point1.y, point2.y), point3.y) - 0.5); | |
std::cout << "yMin " << yMin << " yMax" << yMax << std::endl; |