Pdist
processing
Pdist is available since version 1.0.0.
Signatures
Examples
// @preview image
200 100 '2D2' PGraphics
255 Pbackground
0 Pfill
//random points. Print the distance between points in px
RAND 30 * 'x1' STORE
RAND 30 * 'y1' STORE
RAND 30 * 70 + 'x2' STORE
RAND 30 * 50 + 'y2' STORE
$x1 $y1 $x2 $y2 Pline
$x1 $y1 $x2 $y2 Pdist TOSTRING 110 20 Ptext
Pencode
$x1 $x2 - $y1 $y2 - HYPOT // this Warp 10 function does the same for 2D