查看: 1869|回覆: 0

[Jass] DistanceBetweenUnits

[複製鏈接]
發表於 2007-4-23 15:57:33 | 顯示全部樓層 |閲讀模式
  1. function DistanceBetweenUnits takes unit unitA, unit unitB returns real
  2.     return SquareRoot((GetUnitX(unitB) - GetUnitX(unitA)) * (GetUnitX(unitB) - GetUnitX(unitA)) + (GetUnitY(unitB) - GetUnitY(unitA)) * (GetUnitY(unitB) - GetUnitY(unitA)))
  3. endfunction
複製代碼


轉貼自https://www.wc3jass.com/
 
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

关注公众号

相关侵权、举报、投诉及建议等,请发 E-mail:[email protected]

Powered by Discuz! X5.0 Licensed © 2001-2026 Discuz! Team.

在本版發帖
关注公众号
返回頂部