require "matrix"unit = 2theta = Math::PI/2 # 90 degreesrotate = Matrix[[Math.cos(theta), -Math.sin(theta)], [Math.sin(theta), Math.cos(theta)]]rotate*unit # [-1.0, 1.0]: 90 degree rotation