Пример #1
0
// And for scaling - default aborts for when scaling not supported
void
ClpMatrixBase::transposeTimes(double scalar,
                              const double * x, double * y,
                              const double * rowScale,
                              const double * /*columnScale*/,
                              double * /*spare*/) const
{
     if (rowScale) {
          std::cerr << "Scaling not supported - ClpMatrixBase" << std::endl;
          abort();
     } else {
          transposeTimes(scalar, x, y);
     }
}
Пример #2
0
const Transform2 transformInverseBy(const Transform2& a, const Transform2& b)
{
    GEOMETRY_RUNTIME_ASSERT(a.scaling > 0.0f);
    GEOMETRY_RUNTIME_ASSERT(b.scaling > 0.0f);

    const Matrix2x2 r = transposeTimes(a.rotation, b.rotation);
    const float s = b.scaling / a.scaling;

    return Transform2(
        (-s * a.translation) * r + b.translation,
        r,
        s
    );
}