mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-03 01:05:14 +08:00
Small optimization on an incredibly hot codepath.
This commit is contained in:
parent
7e51cbcf69
commit
060d2da7fe
@ -116,8 +116,7 @@ sub distance_between_points {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub comparable_distance_between_points {
|
sub comparable_distance_between_points {
|
||||||
my ($p1, $p2) = @_;
|
return (($_[0]->[X] - $_[1]->[X])**2) + (($_[0]->[Y] - $_[1]->[Y])**2);
|
||||||
return (($p1->[X] - $p2->[X])**2) + (($p1->[Y] - $p2->[Y])**2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub point_line_distance {
|
sub point_line_distance {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user