mirror of
				https://fem.mint.lgbt/m/Rhythmblock.git
				synced 2024-08-14 20:27:11 +00:00 
			
		
		
		
	added rounding function
This commit is contained in:
		
							parent
							
								
									d85c57d3ea
								
							
						
					
					
						commit
						504d8f4550
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
					@ -2,9 +2,13 @@ accentColor = colors.gray
 | 
				
			||||||
buttonColor = colors.lightGray
 | 
					buttonColor = colors.lightGray
 | 
				
			||||||
backgroundColor = colors.black
 | 
					backgroundColor = colors.black
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function round(n)
 | 
				
			||||||
 | 
					    return n % 1 >= 0.5 and math.ceil(n) or math.floor(n)
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
width, height = term.getSize()
 | 
					width, height = term.getSize()
 | 
				
			||||||
centerWidth = math.round(width / 2)
 | 
					centerWidth = round(width / 2)
 | 
				
			||||||
centerHeight = math.round(width / 2)
 | 
					centerHeight = round(width / 2)
 | 
				
			||||||
peripherals = peripheral.getNames()
 | 
					peripherals = peripheral.getNames()
 | 
				
			||||||
playing = false
 | 
					playing = false
 | 
				
			||||||
if #peripherals < 0 then
 | 
					if #peripherals < 0 then
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue