首页 > TAG信息列表 > pointB

【Java+swing】实现自动演示的汉诺塔小游戏

目录 1 算法与问题描述 1.1 问题描述 1.2 递归算法 1.3 非递归算法 2 游戏程序的总体设计 2.1 HannoiWindow类设计 2.2 Tower类设计 2.3 Disc类设计 2.4 TowerPoint类设计 2.5 HandleMouse类设计 2.6  AutoMoveDisc类 3 运行界面展示 4 总结 1 算法与问题描述 1.1 问题描述

csp 202006-1 线性分类器

题目详细说明 #include<iostream> #include<bits/stdc++.h> using namespace std; struct Point{ int x; int y; }pointA[1005],pointB[1005]; int main(){ std::ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n,m; cin>>n>>m

计算两点与正北方向夹角

/* * 计算点B到点A之间的直线 以点A为原点 与正北方向的 顺时针夹角 * 取值范围 +270° ~ -90° * */ function getAngle(pointA, pointB) { let dx = pointB.x - pointA.x; // 水平方向 差距 let dy = pointB.y - pointA.y;// 竖直方向 差距 if (dx === 0 && dy >