几何知识

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
using namespace std;
typedef double Type;
//=========宏定义值============
#define Abs(x) ((x)>0?(x):(-x))
#define Sgn(x) ((x)<0?(-1):(1))
#define Max(a,b) (a>b?(a):(b))
#define Min(a,b) (a<b?(a):(b))
#define Epsilon 1e-8
#define Inf 1e+10
#define pi 3.14159265358979323846
//=============================
//=========================================
Type Deg2Rad(Type deg){return (deg*pi/180.0);}
Type Rad2Deg(Type rad){return (rad*180.0/pi);}
Type Sin(Type deg){return sin(Deg2Rad(deg));}
Type Cos(Type deg){return cos(Deg2Rad(deg));}
Type ArcSin(Type val){return Rad2Deg(asin(val));}
Type ArcCos(Type val){return Rad2Deg(acos(val));}
Type Sqrt(Type val){return sqrt(val);}
//=========================================
//====点=======================
struct Point
{
    Type x;
    Type y;
    Point():x(0),y(0){};
    Point(Type _x,Type _y):x(_x),y(_y){};
};
//==============================
//==========两点间的距离===================
Type Distance(const Point &a,const Point &b)
{
    return Sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));
}
//========================================
//========================================
//===========线段========================
struct Seg
{
    Point a;//起点
    Point b;//终点
    Seg();
    Seg(Point _a,point _b):a(_a),b(_b){};
};
//=======================================

int main()
{
    return 0;
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

u014068781

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值