Add scale to 3x3 matrix
This commit is contained in:
		
							parent
							
								
									7399d2d187
								
							
						
					
					
						commit
						1699e3ae14
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -58,6 +58,13 @@ extension Matrix3x3 {
 | 
			
		|||
        mat.columns.2.y = dy
 | 
			
		||||
        return mat
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static func scale(x: Float, y: Float) -> Matrix3x3 {
 | 
			
		||||
        var mat = self.init(1.0)
 | 
			
		||||
        mat.columns.0.x = x
 | 
			
		||||
        mat.columns.1.y = y
 | 
			
		||||
        return mat
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
extension Matrix4x4 {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue