Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef DISTANCIA_PUNTOS_H
- #define DISTANCIA_PUNTOS_H
- class punto {
- public:
- int resultado;
- punto();
- ~punto();
- double getpunto1();
- void setpunto1(double x1, double y1);
- int getpunto2();
- void setpunto2(double x2, double y2);
- private:
- double x1, y1;
- double x2, y2;
- };
- void punto:: setpunto2(double _x2, double _y2){
- x2 = _x2;
- x2 = _y2;
- }
- void punto :: setpunto1 (double _x1, double _y1){
- x1 = _x1;
- y1 = _y1;
- }
- double punto:: setpunto1(double x1,double y1){
- double resultadosetpunto1;
- resultadosetpunto1= sqrt(pow(x2,2.0) - pow(x1,2.0))+(pow(y2,2.0)-pow(y1,2.0));
- return (resultadosetpunto1);
- }
- #endif /*DISTANCIA_PUNTOS_H */
Add Comment
Please, Sign In to add comment