Add negation for DiscreteAngle
This commit is contained in:
		
							parent
							
								
									de3a6479cf
								
							
						
					
					
						commit
						2b50babcf1
					
				| @ -7,6 +7,8 @@ | |||||||
| class DiscreteAngle16 : public Range16 { | class DiscreteAngle16 : public Range16 { | ||||||
| public: | public: | ||||||
|   DiscreteAngle16(float angle); |   DiscreteAngle16(float angle); | ||||||
|  | 
 | ||||||
|  |   inline DiscreteAngle16 &operator-(); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| #endif | #endif | ||||||
| @ -22,3 +22,5 @@ DiscreteAngle16::DiscreteAngle16(float angle) : Range16() { | |||||||
|   // This means that range value 0 is not used
 |   // This means that range value 0 is not used
 | ||||||
|   this->range = (unsigned short)((angle + 180.0F) * 65535.0F); |   this->range = (unsigned short)((angle + 180.0F) * 65535.0F); | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | DiscreteAngle16 &DiscreteAngle16::operator-() { -this->range; } | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Pascal Serrarens
						Pascal Serrarens