Esempio n. 1
0
/**
 * returns acceleration for velocity.
 * This profile selects the two functions like the old scheme did
 */
static double
ClassicProfile(DeviceIntPtr dev,
               DeviceVelocityPtr vel,
               double velocity, double threshold, double acc)
{
    if (threshold > 0) {
        return SimpleSmoothProfile(dev, vel, velocity, threshold, acc);
    }
    else {
        return PolynomialAccelerationProfile(dev, vel, velocity, 0, acc);
    }
}
Esempio n. 2
0
/**
 * returns acceleration for velocity.
 * This profile selects the two functions like the old scheme did
 */
static float
ClassicProfile(
    DeviceVelocityPtr pVel,
    float velocity,
    float threshold,
    float acc)
{
    if (threshold) {
	return SimpleSmoothProfile (pVel,
	                            velocity,
                                    threshold,
                                    acc);
    } else {
	return PolynomialAccelerationProfile (pVel,
	                                      velocity,
                                              0,
                                              acc);
    }
}