|
Gin
|
Classes | |
| class | Catenary |
| Calculates the curve of a hanging cable (catenary). More... | |
| class | Ellipse< T > |
| Equations to calculate the shape of an ellipse and to calculate points on the edge of the ellipse and to see if points are inside or outside. More... | |
| class | Polygon< T > |
| A simple polygon defined by a series of points. More... | |
Functions | |
| template<typename T> | |
| T | square (T in) |
| Returns the square of a value. | |
| template<typename T> | |
| bool | solveLine (T x1, T y1, T x2, T y2, T &m, T &b) |
| Solves for the slope and intercept of a line given two points. | |
| T square | ( | T | in | ) |
Returns the square of a value.
| in | The value to square |
Referenced by Ellipse< T >::isPointInside(), Ellipse< T >::isPointOn(), Ellipse< T >::isPointOutside(), and Ellipse< T >::pointAtAngle().
| bool solveLine | ( | T | x1, |
| T | y1, | ||
| T | x2, | ||
| T | y2, | ||
| T & | m, | ||
| T & | b ) |
Solves for the slope and intercept of a line given two points.
Calculates m and b in the equation y = mx + b from two points on the line.
| x1 | X coordinate of the first point |
| y1 | Y coordinate of the first point |
| x2 | X coordinate of the second point |
| y2 | Y coordinate of the second point |
| m | Output: the slope of the line |
| b | Output: the y-intercept of the line |