博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年3月16日

摘要: http://huanghs16.bokee.com/2019692.html求取向量A逆时针到向量B的夹角 算法思路:通过余弦定理求取向量夹角的cosa,然后判断夹角是否大于180,如果大于,则向量夹角为360-arccosa*180/Pi(单位为°);否则夹角为arccosa*180/Pi。(Pi为常量3.14159265)。实验代码如下:1、先定义Point头文件(Point.h)# ifndef POINT_H_# define POINT_H_class Point{public: Point() { x=0.0; y=0.0; } Point(float inx,... 阅读全文

posted @ 2013-03-16 18:36 编著人 阅读(11265) 评论(0) 推荐(1) 编辑

摘要: http://blog.sina.com.cn/s/blog_65c4bd270100nya0.html 阅读全文

posted @ 2013-03-16 00:14 编著人 阅读(196) 评论(0) 推荐(0) 编辑