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.
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
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.1 | Download ZIP · Browse files | a39d1c7d9d | 87aaed25a865860ca4c2bd4c609d5c46a1465124041abcdd30835c8593428044 |
| 0.1.0 | Download ZIP · Browse files | 6349f23784 | ab185085405ca2d9bc6c36f38d5b67c244e8c2587de8c9136b0b8dbfd6d2f3d5 |