forked from aerolalit/RANSAC-Algorithm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLinearEqu.cpp
More file actions
34 lines (33 loc) · 765 Bytes
/
LinearEqu.cpp
File metadata and controls
34 lines (33 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//
// LinearEqu.cpp
// cppransac
//
// Created by ललित सिंह on 09/11/2016.
// Copyright © 2016 ललित सिंह. All rights reserved.
//
#include "LinearEqu.hpp"
#include "Header.hpp"
LinearEqu::LinearEqu(){
this -> A = 0;
this -> B = 0;
this -> C = 0;
}
LinearEqu::LinearEqu(double A, double B, double C){
this-> A = A;
this-> B = B;
this-> C = C;
}
LinearEqu:: LinearEqu( mypoint2f a, mypoint2f b ){
this-> A = 2* (b.getx() - a.getx());
this-> B = 2 * ( b.gety() - a.gety());
this-> C = sqr(b.getx()) + sqr(b.gety()) - sqr(a.getx()) - sqr(a.gety());
}
double LinearEqu::getA(){
return this->A;
}
double LinearEqu::getB(){
return this->B;
}
double LinearEqu::getC(){
return this->C;
}