I'm not sure if I understand your question but here goes:
I think you want the sprite to wave over an angle back and forth:
Not this is pseudocode (as you didn't state the language):
t=(t+wavespeed)%TwoPi;
a = Sin(t)*amplitude;
Position.X=StartPosition.X + Cos(angle) * a;
Position.Y=StartPosition.Y + Sin(angle) * a;
t
controls the waving motion; the wavespeed
variable is a small value like 0.01
(note that it should slowly range from 0 to TwoPi). amplitude
is the maximum you want your sprite to move, a
is calculated as the amplitude for that frame. angle
is the angle of the axis you want your sprite to wave along.