Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vec3d #21

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions vec_3d.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
Gautham Prem Krishnan
*/

#pragma once
#include <iostream>
#include "robot.hh";
#include "beacon";
using namespace std;

class vec_3d{
private:
double x1,y1,x2,y2;

public:
vec_3d() : x1(0), y1(0),x2(0),y2(0){}
vec_3d(double x_input, double y_input, double z_input):x1(x_input),y1(y_input),z1(z_input){}
vec_3d(double x_input, double y_input) :x1(x_input),y1(y_input),z1(0){}
vec_3d(double x_input) : x1(x_input), y1(0), z1(0){
}


double batterylife() const{
cout<<"Battery Life";
}

double location(const vec_3d& a,const vec_3d& b){
double ans = (a.x1 - a.x1, b.y1-b.y2);
return ans;
}
};