[Math] MARKs for general health
This commit is contained in:
		
							parent
							
								
									d536e8f04b
								
							
						
					
					
						commit
						a1270d4ea5
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -189,6 +189,8 @@ extension Vector3 { | |||
|     } | ||||
| } | ||||
| 
 | ||||
| // MARK: Addition | ||||
| 
 | ||||
| public prefix func -<T: Vector>(v: T) -> T { | ||||
|     var out = v | ||||
|     for i in 0..<T.count { | ||||
|  | @ -221,6 +223,8 @@ public func -<T: Vector>(lhs: T, rhs: T) -> T { | |||
|     return out | ||||
| } | ||||
| 
 | ||||
| // MARK: Multiplication | ||||
| 
 | ||||
| public func *=<T: Vector>(inout lhs: T, rhs: Float) { | ||||
|     for i in 0..<T.count { | ||||
|         lhs[i] *= rhs | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue