This file contains hidden or 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
#include <iostream> | |
#include <utility> | |
#include <tuple> | |
using namespace std; | |
// | |
// forward declare | |
// | |
template<int N1, int N2, int LAST, typename T> |
This file contains hidden or 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 CalculateEdgeNormal(float& nx, float& ny, float x0, float y0, float x1, float y1) | |
{ | |
const float x01 = x1 - x0; | |
const float y01 = y1 - y0; | |
const float length = Sqrt(x01 * x01 + y01 * y01); | |
const float dx = x01 / length; | |
const float dy = y01 / length; |
NewerOlder