Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
3ae8d23b29 | |||
b000e93584 |
2
Line.h
2
Line.h
@ -58,7 +58,7 @@ public:
|
|||||||
float b = to().x() - from().x();
|
float b = to().x() - from().x();
|
||||||
float c = from().x() * to().y() - to().x() * from().y();
|
float c = from().x() * to().y() - to().x() * from().y();
|
||||||
|
|
||||||
float d = abs(a * other.x() + b * other.y() + c);
|
float d = a * other.x() + b * other.y() + c;
|
||||||
|
|
||||||
return (d * d) / (a * a + b * b);
|
return (d * d) / (a * a + b * b);
|
||||||
}
|
}
|
||||||
|
3
main.cpp
3
main.cpp
@ -35,9 +35,10 @@ int main (int argc, char **argv)
|
|||||||
// 1. random numbers in screen range
|
// 1. random numbers in screen range
|
||||||
// 2. numbers are ordered as rectangle
|
// 2. numbers are ordered as rectangle
|
||||||
// 3. numbers are ordered as circle around screen center
|
// 3. numbers are ordered as circle around screen center
|
||||||
|
// 4. numbers are ordered as diagonal line
|
||||||
// -runs <count> runs performance mode multiple times
|
// -runs <count> runs performance mode multiple times
|
||||||
// -stepsize <size> time between autosteps; if 0 or not provided -> manual steps
|
// -stepsize <size> time between autosteps; if 0 or not provided -> manual steps
|
||||||
// TODO: care a little more <3
|
// TODO: care a little more <3 --> getopt
|
||||||
bool vis = false;
|
bool vis = false;
|
||||||
bool akl = false;
|
bool akl = false;
|
||||||
std::string fileRnd = "";
|
std::string fileRnd = "";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user