static Mat2D fromRotation(Mat2D o, double rad) { double s = sin(rad); double c = cos(rad); o[0] = c; o[1] = s; o[2] = -s; o[3] = c; o[4] = 0.0; o[5] = 0.0; return o; }