Line2D.cpp
1 #include "Line2D.hpp"
2 
3 Line2D::Line2D(double a,double b,double above,double under):
4 _a(a),_b(b),_above(above),_under(under){}
5 
6 Line2D::~Line2D(void)
7 {
8 }
9 
10 double Line2D::operator()(Vector2D const& r) const
11 {
12  if(r.y>(_a*r.x+_b))
13  return _above;
14  else
15  return _under;
16 }
double operator()(const Vector2D &r) const
Evaluates the function.
Definition: Line2D.cpp:10
Line2D(double a, double b, double above, double under)
Class constructor.
Definition: Line2D.cpp:3
double y
Component in the y direction.
Definition: geometry.hpp:48
A spatial distribution with a Line step function.
2D Mathematical vector
Definition: geometry.hpp:15
double x
Component in the x direction.
Definition: geometry.hpp:45