mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	Use approximate equallity methods in many places
This commit is contained in:
		
							parent
							
								
									c577ec6ae4
								
							
						
					
					
						commit
						b659e1eb2b
					
				
					 21 changed files with 66 additions and 66 deletions
				
			
		|  | @ -2473,7 +2473,7 @@ void SpatialEditorViewport::_draw() { | |||
| 				real_t max_speed = camera->get_zfar(); | ||||
| 				real_t scale_length = (max_speed - min_speed); | ||||
| 
 | ||||
| 				if (Math::abs(scale_length) > CMP_EPSILON) { | ||||
| 				if (!Math::is_zero_approx(scale_length)) { | ||||
| 					real_t logscale_t = 1.0 - Math::log(1 + freelook_speed - min_speed) / Math::log(1 + scale_length); | ||||
| 
 | ||||
| 					// There is no real maximum speed so that factor can become negative,
 | ||||
|  | @ -2491,7 +2491,7 @@ void SpatialEditorViewport::_draw() { | |||
| 				real_t max_distance = camera->get_zfar(); | ||||
| 				real_t scale_length = (max_distance - min_distance); | ||||
| 
 | ||||
| 				if (Math::abs(scale_length) > CMP_EPSILON) { | ||||
| 				if (!Math::is_zero_approx(scale_length)) { | ||||
| 					real_t logscale_t = 1.0 - Math::log(1 + cursor.distance - min_distance) / Math::log(1 + scale_length); | ||||
| 
 | ||||
| 					// There is no real maximum distance so that factor can become negative,
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Aaron Franke
						Aaron Franke