b2dGetDistance

Category: 2D Overlay

Syntax:

b2dGetDistance:Int(x1:Int, y1:Int, x2:Int, y2:Int)


Parameters

Returns

Int



Summary

Calculates Euclidean distance between two points (sqrt(dx^2+dy^2), integer result, use for proximity checks).

Takes x1 (first point X coordinate, integer), y1 (first point Y coordinate, integer), x2 (second point X coordinate, integer), y2 (second point Y coordinate, integer).

Returns distance (integer pixels, rounded from sqrt, 0=same point).

View detailed documentation online



Example

;No example implemented yet


BambooBasic © 2026 Michael Denathorn