double CotValue(const Vector3D& a, const Vector3D& b, const Vector3D& c) { double cosx = CosValue(a,b,c); double sinx = std::max(SinValue(a,b,c),1e-8); double cotx = cosx/sinx; return cotx; }
void Util3D::MatrixRotateY(Mtx mt,f32 rad) { f32 SinValue( sinf(rad) ); f32 CosValue( cosf(rad) ); //sincosf(rad,&SinValue,&CosValue); // Y mt[0][0] = CosValue; mt[0][1] = 0.0f; mt[0][2] = SinValue; mt[0][3] = 0.0f; mt[1][0] = 0.0f; mt[1][1] = 1.0f; mt[1][2] = 0.0f; mt[1][3] = 0.0f; mt[2][0] = -SinValue; mt[2][1] = 0.0f; mt[2][2] = CosValue; mt[2][3] = 0.0f; };