Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Func _CalculatePixelDistance($x1, $y1, $z1=0, $x2=0, $y2=0, $z2=0)
- Local $x, $y, $z, $d
- If ($x2 = $x1) And ($y2 = $y1) And ($z1 = $z2) Then
- Return 0
- Else
- $x = $x2 - $x1
- $y = $y2 - $y1
- $z = $z2 - $z1
- $d = Sqrt($x^2 + $y^2 + $z^2)
- Return $d
- EndIf
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement