Прямая вида ax+by+c=0.
More...
#include <obstacles.h>
◆ LinearFunction() [1/2]
math::LinearFunction::LinearFunction |
( |
double | a, |
|
|
double | b, |
|
|
double | c ) |
|
inline |
double a_coef
Definition obstacles.h:32
double c_coef
Definition obstacles.h:32
double b_coef
Definition obstacles.h:32
◆ LinearFunction() [2/2]
21 {
25 (point2.
x - point1.
x) * point1.
y - (point2.
y - point1.
y) * point1.
x;
26 }
double y
Definition point.h:18
double x
Definition point.h:17
◆ operator==()
bool math::LinearFunction::operator== |
( |
const LinearFunction & | other | ) |
const |
|
inline |
34 {
35 double proportion = ((std::abs(
a_coef) >= precision) &&
36 (std::abs(other.a_coef) >= precision))
39 return (std::abs(other.a_coef - proportion *
a_coef) < precision) &&
40 (std::abs(other.b_coef - proportion *
b_coef) < precision) &&
41 (std::abs(other.c_coef - proportion *
c_coef) < precision);
42 }
◆ Substitute()
double math::LinearFunction::Substitute |
( |
const lib::Point & | p | ) |
const |
|
inline |
◆ a_coef
double math::LinearFunction::a_coef |
◆ b_coef
double math::LinearFunction::b_coef |
◆ c_coef
double math::LinearFunction::c_coef |
The documentation for this struct was generated from the following file: