 fResult *= pow(exp(1.0),(fA*flnX + fB*flnY - GetLogBeta(fA,fB)));
    if (bReflect)
        fResult = 0.5 - fResult + 0.5;
    if (fResult > 1.0)
        fResult = 1.0;
    if (fResult < 0.0)
        fResult = 0.0;
    return fResult;
}
