平分正方形的直线
来源:互联网 发布:黑火金融网络贷款 编辑:程序博客网 时间:2024/04/28 12:08
package 平分的直线;class Point { int x; int y; public Point(int x, int y) { this.x = x; this.y = y; } public Point() { this.x = 0; this.y = 0; }}public class Bipartition { public double[] getBipartition(Point[] A, Point[] B) { double firstX = (A[0].x + A[1].x) / 2.0; double firstY = (A[0].y + A[3].y) / 2.0; double secondX = (B[0].x + B[1].x) / 2.0; double secondY = (B[0].y + B[3].y) / 2.0; double slope = (secondY - firstY) / (secondX - firstX); double y = secondY - slope * secondX; double[] res = new double[2]; res[0] = slope; res[1] = y; return res; } public static void main(String[] args) { }}
0 0
- 平分正方形的直线
- 平分的直线
- 1.4 平分两个正方形
- 零点定理的奇妙应用:平分面积的直线
- 程序员面试金典——平分的直线
- canvas直线.圆和正方形的画法
- 程序员面试金典:平分的直线、穿点最多的直线
- UVA Birthday Cake (一条直线平分草莓)
- 平分液体问题的解决
- 程序员面试金典: 9.7数学与概率 7.5寻找能将将两个正方形对半分的直线
- Vijos 1307-黑皮的正方形【正方形计算】
- oracle 求平分price后的查询
- TableRow平分每列的问题
- TableRow平分每列的问题
- 求正方形的边长
- 完美的正方形分割
- [HAOI2007]理想的正方形
- 计算正方形的个数
- Spark on YARN工作原理
- 山科大oj--编写函数:各位数字之和 (Append Code)
- XML的基本语法(XML实现html的网页布局的简单功能)
- hadoop校验和
- App打包上线需要做什么
- 平分正方形的直线
- 压力测试工具之webbench
- ubuntu下挂载虚拟机硬盘的方法
- VC实现一个库,并用VB(Visual Basic)来调用的方法,包括传递数组的方法
- WEKA中的参数优化问题
- 查火车票检票口的公众号: 查查火车
- cglib源码学习交流
- swift3.0使用总结
- 使用PDH获取windows状态