mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Ported same_line() to XS
This commit is contained in:
		
							parent
							
								
									b5aaeb9b12
								
							
						
					
					
						commit
						d8e098ab0e
					
				
					 5 changed files with 21 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -14,7 +14,7 @@ our @EXPORT_OK = qw(
 | 
			
		|||
    polygon_has_vertex polyline_length can_connect_points deg2rad rad2deg
 | 
			
		||||
    rotate_points move_points clip_segment_polygon
 | 
			
		||||
    sum_vectors multiply_vector subtract_vectors dot perp polygon_points_visibility
 | 
			
		||||
    line_intersection bounding_box bounding_box_intersect same_point same_line
 | 
			
		||||
    line_intersection bounding_box bounding_box_intersect same_point
 | 
			
		||||
    longest_segment angle3points three_points_aligned line_direction
 | 
			
		||||
    polyline_remove_parallel_continuous_edges polyline_remove_acute_vertices
 | 
			
		||||
    polygon_remove_acute_vertices polygon_remove_parallel_continuous_edges
 | 
			
		||||
| 
						 | 
				
			
			@ -112,11 +112,6 @@ sub same_point {
 | 
			
		|||
    return $p1->[X] == $p2->[X] && $p1->[Y] == $p2->[Y];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub same_line {
 | 
			
		||||
    my ($line1, $line2) = @_;
 | 
			
		||||
    return same_point($line1->[A], $line2->[A]) && same_point($line1->[B], $line2->[B]);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub distance_between_points {
 | 
			
		||||
    my ($p1, $p2) = @_;
 | 
			
		||||
    return sqrt((($p1->[X] - $p2->[X])**2) + ($p1->[Y] - $p2->[Y])**2);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue