Blyx Nest Blyx language
Registry / Library
library · v0.1.1

Segment Distance Sq

Return squared Euclidean distance from a point to a closed segment, including the zero-length case.

Source repository · Package JSON

Use Segment Distance Sq

use vendor::segment_distance_sq::segment_distance_sq;

Run the example

nest demo segment_distance_sq@0.1.1
blyxc native-run segment_distance_sq-demo/main.blyx
Example source and expected output
use vendor::segment_distance_sq::segment_distance_sq;

fn main() {
    println!(segment_distance_sq(1.0,3.0,0.0,0.0,2.0,0.0));
}

Expected output

9

Published versions

VersionPackageSource commitSHA-256
0.1.1Download ZIP · Browse filesa39d1c7d9d87aaed25a865860ca4c2bd4c609d5c46a1465124041abcdd30835c8593428044
0.1.0Download ZIP · Browse files6349f23784ab185085405ca2d9bc6c36f38d5b67c244e8c2587de8c9136b0b8dbfd6d2f3d5