13 #include <boost/optional.hpp> 16 #include "Geometry/Vec2.h" 29 boost::optional<float>
m;
35 boost::optional<float>
b;
41 boost::optional<float>
xpos;
86 boost::optional<float>
103 boost::optional<float>
bool vertical
Indicate if this line is vertical.
Definition: Line2.h:47
boost::optional< float > line2Intersection(const Line2 &a, const Line2 &b)
Compute the x value of the intersection of two lines.
Definition: Line2.cpp:40
boost::optional< float > m
The slope of the line.
Definition: Line2.h:29
boost::optional< float > xpos
The x value of a vertical line.
Definition: Line2.h:41
boost::optional< float > b
The y-intersect of the line.
Definition: Line2.h:35
Line2(const float &m, const float &b)
A constructor that creates a non-vertical line from the two parameters that describe a 2D line...
Definition: Line2.cpp:14
This struct represents a vertical 2D line or a line of the form y = mx + b.
Definition: Line2.h:24
boost::optional< float > eval(const float &x)
Evaluate the line function for a given x.
Definition: Line2.cpp:31
This file provides using and enum declarations.