本帖最后由 笨来无一悟 于 2024-6-18 04:50 编辑
小数版本一般用不到 有人反馈上一个版本 尾巴的大于180等于360减...不够纯汇编(不完美) 这个版本又改了改 测速循环12345678次 整数版本比小数版本快120毫秒左右 小数版本比上一个小数版本快20到30毫秒 还有更快的写法 但是调用起来不方便 直接用上上个版本的atan2 两个斜边分开计算再做差取绝对值 再判断是不是大于180大于就360减...麻烦了一点 追求更快的可以用更麻烦的那份
|
量角器 | 双精度小数型 | | |
起点横 | 整数型 | | | | 起点纵 | 整数型 | | | | 角心横 | 整数型 | | | | 角心纵 | 整数型 | | | | 落点横 | 整数型 | | | | 落点纵 | 整数型 | | | | 置入代码 ({ 131, 236, 24, 54, 199, 69, 252, 220, 165, 76, 64, 54, 199, 69, 248, 248, 193, 99, 26, 139, 69, 8, 43, 69, 16, 137, 69, 8, 139, 93, 12, 43, 93, 20, 137, 93, 12, 139, 77, 24, 43, 77, 16, 137, 77, 24, 139, 85, 28, 43, 85, 20, 137, 85, 28, 54, 219, 69, 8, 54, 219, 69, 12, 217, 243, 54, 220, 77, 248, 54, 221, 93, 240, 54, 219, 69, 24, 54, 219, 69, 28, 217, 243, 54, 220, 77, 248, 54, 221, 93, 232, 54, 221, 69, 240, 54, 221, 69, 232, 222, 233, 217, 225, 54, 221, 93, 248, 54, 242, 15, 16, 69, 248, 184, 180, 0, 0, 0, 242, 15, 42, 200, 102, 15, 46, 200, 114, 2, 235, 17, 184, 104, 1, 0, 0, 242, 15, 42, 208, 242, 15, 92, 208, 242, 15, 16, 194, 54, 242, 15, 17, 69, 248, 139, 85, 252, 139, 69, 248, 131, 196, 24, 201, 194, 24, 0 })返回 (0 ) |
量角器_小数 | 双精度小数型 | | |
起点横 | 双精度小数型 | | | | 起点纵 | 双精度小数型 | | | | 角心横 | 双精度小数型 | | | | 角心纵 | 双精度小数型 | | | | 落点横 | 双精度小数型 | | | | 落点纵 | 双精度小数型 | | | | 置入代码 ({ 54, 199, 69, 252, 220, 165, 76, 64, 54, 199, 69, 248, 248, 193, 99, 26, 54, 242, 15, 16, 69, 8, 54, 242, 15, 92, 69, 24, 54, 242, 15, 17, 69, 8, 54, 242, 15, 16, 77, 16, 54, 242, 15, 92, 77, 32, 54, 242, 15, 17, 77, 16, 54, 242, 15, 16, 85, 40, 54, 242, 15, 92, 85, 24, 54, 242, 15, 17, 85, 40, 54, 242, 15, 16, 93, 48, 54, 242, 15, 92, 93, 32, 54, 242, 15, 17, 93, 48, 54, 221, 69, 8, 54, 221, 69, 16, 217, 243, 54, 220, 77, 248, 54, 221, 93, 24, 54, 221, 69, 40, 54, 221, 69, 48, 217, 243, 54, 220, 77, 248, 54, 221, 93, 32, 54, 221, 69, 32, 54, 221, 69, 24, 222, 233, 217, 225, 54, 221, 93, 248, 242, 15, 16, 69, 248, 184, 180, 0, 0, 0, 242, 15, 42, 200, 102, 15, 46, 200, 114, 2, 235, 17, 184, 104, 1, 0, 0, 242, 15, 42, 208, 242, 15, 92, 208, 242, 15, 16, 194, 242, 15, 17, 69, 248 })返回 (角度 )
|