code: public Matrix3f rotateY(float ang, Matrix3f dest) {
          float sin, cos;
          if (ang == (float) Math.PI || ang == -(float) Math.PI) {
              cos = -1.0f;
              sin = 0.0f;
          } else if (ang == (float) Math.PI * 0.5f || ang == -(float) Math.PI * 1.5f) {
              cos = 0.0f;
              sin = 1.0f;
          } else if (ang == (float) -Math.PI * 0.5f || ang == (float) Math.PI * 1.5f) {
              cos = 0.0f;
              sin = -1.0f;
          } else {
              sin = (float) Math.sin(ang);
              cos = (float) Math.cosFromSin(sin, ang);
          }
          float rm00 = cos;
          float rm20 = sin;
          float rm02 = -sin;
          float rm22 = cos;
  
          // add temporaries for dependent values
          float nm00 = m00 * rm00 + m20 * rm02;
          float nm01 = m01 * rm00 + m21 * rm02;
          float nm02 = m02 * rm00 + m22 * rm02;
          // set non-dependent values directly
          dest.m20 = m00 * rm20 + m20 * rm22;
          dest.m21 = m01 * rm20 + m21 * rm22;
          dest.m22 = m02 * rm20 + m22 * rm22;
          // set other values
          dest.m00 = nm00;
          dest.m01 = nm01;
          dest.m02 = nm02;
          dest.m10 = m10;
          dest.m11 = m11;
          dest.m12 = m12;
  
          return dest;
      }
docs: /* (non-Javadoc)
  @see org.joml.Matrix3fc#rotateY(float, org.joml.Matrix3f)