Move a sprite relative to speed of swipe

What i am doing is calculating speed of swipe by following code

bool HelloWorld::ccTouchBegan(CCTouch pTouch, CCEventpEvent)
{

CCPoint cp=pTouch->locationInView();
cp = CCDirector::sharedDirector()~~>convertToGL;
beginX = cp.x;
t1=timer; //timer is a value calculated from scheduler
return true;
}

void HelloWorld::ccTouchEnded
{
CCPoint cp=pTouch~~>locationInView();
cp = CCDirector::sharedDirector()->convertToGL(cp);
endX = cp.x;
endY = cp.y;
swipeDistance = abs(endX - beginX);
t2=timer;
swipeTime=t2-t1;
swipeVelocity = swipeDistance/swipeTime;

}

I am using this swipe velocity as multiplying factor in moving the sprite
Problem i am facing is that the movement is not smooth enough
Would be gratefull If anyone could help