67
edits
Line 21: | Line 21: | ||
; Pythagorean theorem for 3D planes: sqrt((x2 - x1)^2 + (y2 - y1)^2 + (z2 - z1)^2) | ; Pythagorean theorem for 3D planes: sqrt((x2 - x1)^2 + (y2 - y1)^2 + (z2 - z1)^2) | ||
float | float fDist = Math.sqrt(Math.pow((coords[3] - coords[0]), 2) + Math.pow((coords[4] - coords[1]), 2) + Math.pow((coords[5] - coords[2]), 2)) | ||
Debug.trace("Travelled " + | Debug.trace("Travelled " + fDist + " units.") | ||
EndEvent | EndEvent | ||
</source> | </source> | ||
--[[User:Ingvion|Ingvion]] ([[User talk:Ingvion|talk]]) 10:13, 13 July 2023 (EDT) | --[[User:Ingvion|Ingvion]] ([[User talk:Ingvion|talk]]) 10:13, 13 July 2023 (EDT) |
edits