Making a bullet path travel in a sine wave

I am currently making a flamethrower weapon for my 2D topdown shooter, and the purpose is for the bullets to be shot at a very fast rate. I am unhappy with how uniform it becomes though, so I would love to implement a slight sinusoidal curve into the bullet path. I have attached a photo of the current straight path, as well as the code which implements that, and I am just trying now to figure out how to implement mathf.sin() into my code.

``````function ShootFlamethrower () {
var bulletClone : Rigidbody2D = Instantiate(bulletFlamethrower, transform.position, transform.rotation);
bulletClone.transform.rotation = Quaternion.AngleAxis(angle, Vector3.forward);
}
``````

I am very new to game programming, so I really appreciate any and all help. Thank you kindly!

Alternatively you could simply spawn the bullets at a changing point based on a sinusoidal curve so that (as Graham said) you don’t have to calculate the position of each bullet every frame:

``````function ShootFlamethrower () {
var pos = transform.position;
pos.y += Mathf.Sin(Time.time*180)*0.5;
var bulletClone : Rigidbody2D = Instantiate(bulletFlamethrower, pos, transform.rotation);
bulletClone.transform.rotation = Quaternion.AngleAxis(angle, Vector3.forward);