mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Further simplification of point_in_polygon()
This commit is contained in:
		
							parent
							
								
									4f5870fdb6
								
							
						
					
					
						commit
						7d6545dd07
					
				
					 1 changed files with 2 additions and 6 deletions
				
			
		|  | @ -155,12 +155,8 @@ sub point_in_polygon { | |||
|      | ||||
|     my ($x, $y) = @$point; | ||||
|     my $n = @$polygon; | ||||
|     my @x; | ||||
|     my @y; | ||||
|     foreach (0..$n-1) { | ||||
|       push @x, $polygon->[$_]->[X]; | ||||
|       push @y, $polygon->[$_]->[Y]; | ||||
|     } | ||||
|     my @x = map $_->[X], @$polygon; | ||||
|     my @y = map $_->[Y], @$polygon; | ||||
|      | ||||
|     # Derived from the comp.graphics.algorithms FAQ, | ||||
|     # courtesy of Wm. Randolph Franklin | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci