#include<cstdio>
#include<cmath>
#include<cstring>
#include<cstdlib>
const double pi=3.141592653;
int main(){
int t;
scanf("%d",&t);
while(t--){
int n;
scanf("%d",&n); double ans=; double x1,y1,x2,y2; for(int i=;i<=n;i++){
scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
double temp=fabs(atan2(y1,x1)-atan2(y2,x2));//atan2,特别注意
if(temp>pi)
temp=2.0*pi-temp;
ans+=temp; }
printf("%.5lf\n",ans/(pi*2.0)); }
return ;
}

最新文章

  1. iOS Salesforce SDK 小知识
  2. GoLang 通过http Post获取数据
  3. Yaf零基础学习总结5-Yaf类的自动加载
  4. Bounce.js – 快速创建漂亮的 CSS3 动画效果
  5. Android——Handler总结
  6. CentOS 配置vncserver
  7. uestc 1721 吴神,人类的希望
  8. DEV GridControl 鼠标单击事件
  9. Hibernate持久化对象状态
  10. 回调函数 use
  11. JS-类型转换
  12. Python @property 详解
  13. phpcms V9首页、列表页以及内容页调用标签
  14. SQL Server最大内存设为0后的处置办法
  15. Codeforces Round #507 Div. 1
  16. day03 变量 运算符 基本数据类型 输出功能 格式化输出
  17. postgresql-磁盘空间不足问题排查
  18. 别人的Linux私房菜(1)计算机概论
  19. Supported Values for @SuppressWarnings(转)
  20. js判断操作系统与浏览器

热门文章

  1. 不使用data-ng-app指令的表达式
  2. C#程序设计入门经典之C#的基本语法
  3. 4、SpringBoot------邮件发送(2)
  4. 时间复杂度 log n
  5. hdu_2837_Calculation(欧拉函数,快速幂求指数循环节)
  6. ssm整合-错误2
  7. Python入门必知的几个点
  8. 数据结构学习-AVL平衡树
  9. POJ:2236-Wireless Network
  10. Git-改变历史