View tests.yml
name: Tests (PHP) | |
on: [push] | |
jobs: | |
tests: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 |
View policy.xml
<?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> | |
]> |
View gist:5638930
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; |
View gist:5615261
//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; |