fix: nekonečné desetiné rozvoje
This commit is contained in:
		
							parent
							
								
									87a209bf2a
								
							
						
					
					
						commit
						0c7a411c1f
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -123,8 +123,8 @@ class Hodnoceni(bm.SeminarModelBase): | ||||||
| 
 | 
 | ||||||
| 	# TODO najít správné místo | 	# TODO najít správné místo | ||||||
| 	@staticmethod | 	@staticmethod | ||||||
| 	def inverze_vzorecku_na_prepocet(body, resitelu): | 	def inverze_vzorecku_na_prepocet(body: decimal.Decimal, resitelu) -> decimal.Decimal: | ||||||
| 		return decimal.Context(prec=1).create_decimal_from_float(body * (resitelu + 2) / 3) | 		return round(body * (resitelu + 2) / 3, 1) | ||||||
| 
 | 
 | ||||||
| 	@property | 	@property | ||||||
| 	def body_celkem(self): | 	def body_celkem(self): | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue