// Point.cpp: implementation of the Point class.
//
//////////////////////////////////////////////////////////////////////
#include "Point.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
Point Point::operator +(Point pt2)
{
Point temp;
temp.x=this->x+pt2.x;
temp.y=this->y+pt2.y;
return temp;
}
double Point::operator ^(Point pt2)
{
double d1,d2,d;
d1=this->x-pt2.x;
d2=this->y-pt2.y;
d=sqrt(d1*d1+d2*d2);
return (d);
}
void Point::display()
{ cout<<"("<<x<<","<<y<<")"<<endl; }
Point::~Point()
{
}
rd.zip_运算符重载
版权申诉
149 浏览量
2022-09-22
22:56:24
上传
评论
收藏 314KB ZIP 举报
alvarocfc
- 粉丝: 105
- 资源: 1万+
最新资源
- python tkinter-08-盒子模型.ev4.rar
- Doozy UI Manager 2023
- 基于matlab实现夜间车牌识别程序(1).rar
- 基于matlab实现无线传感器网络无需测距定位算法matlab源代码 包括apit,dv-hop,amorphous在内的共7个
- 基于python的yolov5实现的旋转目标检测
- 基于matlab实现无线传感器网络 CAB定位仿真程序 这是无线传感器节点定位CAB算法的仿真程序,由matlab完成.rar
- 基于matlab实现图像处理,本程序使用背景差分法对来往车辆进行检测和跟踪.rar
- 基于matlab实现视频监控中车型识别代码,自己写的,希望和大家多多交流.rar
- springcodespringcodespringcodespringcode
- 基于matlab实现权值的MAXDEV无线传感器网络定位算法研究 MAXDEV 无线传感器 定位 算法.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈