Fixed direction for spherical
This commit is contained in:
		
							parent
							
								
									28ee2254b8
								
							
						
					
					
						commit
						2c57c3f6c0
					
				@ -14,11 +14,11 @@ template <typename T>
 | 
				
			|||||||
SphericalOf<T>::SphericalOf(float distance, AngleOf<T> horizontal,
 | 
					SphericalOf<T>::SphericalOf(float distance, AngleOf<T> horizontal,
 | 
				
			||||||
                            AngleOf<T> vertical) {
 | 
					                            AngleOf<T> vertical) {
 | 
				
			||||||
  if (distance < 0) {
 | 
					  if (distance < 0) {
 | 
				
			||||||
    this->distance = distance;
 | 
					 | 
				
			||||||
    this->direction = DirectionOf<T>(horizontal, vertical);
 | 
					 | 
				
			||||||
  } else {
 | 
					 | 
				
			||||||
    this->distance = -distance;
 | 
					    this->distance = -distance;
 | 
				
			||||||
    this->direction = -DirectionOf<T>(horizontal, vertical);
 | 
					    this->direction = -DirectionOf<T>(horizontal, vertical);
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    this->distance = distance;
 | 
				
			||||||
 | 
					    this->direction = DirectionOf<T>(horizontal, vertical);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user