>>> identity :: M44 Int V4 (V4 1 0 0 0) (V4 0 1 0 0) (V4 0 0 1 0) (V4 0 0 0 1) >>> identity :: V3 (V3 Int) V3 (V3 1 0 0) (V3 0 1 0) (V3 0 0 1)
identity n = n 1 ( 1 0 ... 0 0 ) 2 ( 0 1 ... 0 0 ) ( ... ) ( 0 0 ... 1 0 ) n ( 0 0 ... 0 1 )
identity ((*) :: Int -> Int -> Int) 1
identity ((+) :: Int -> Int -> Int) 0
identity ((*) :: Int -> Int -> Int) 1
identity ((+) :: Int -> Int -> Int) 0
>>> Matrix.identity (Shape.ZeroBased 0) :: Matrix.Square (Shape.ZeroBased Int) Real_ StorableArray.fromList (ZeroBased {... 0},ZeroBased {... 0}) [] >>> Matrix.identity (Shape.ZeroBased 3) :: Matrix.Square (Shape.ZeroBased Int) Real_ StorableArray.fromList (ZeroBased {... 3},ZeroBased {... 3}) [1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0]
apply identity = id
identitiy @n = ( 1 0 0 ... 0 0 ) ( 0 1 0 ... 0 0 ) ( ... ) ( 0 0 0 ... 1 0 ) ( 0 0 0 ... 0 1 )