Maybe. But i ACTUALLY did a snowflake code last week, using sin() for the oscillation:
public class Flakes {
public float x, y;
public float gravity = 0.2F;
public int randomMotion = RNG.getRNG(1,8);
public Flakes(int x, int y) {
this.x = x;
this.y = y;
}
public void tick() {
this.y += gravity;
if (Game.instance.ticks % randomMotion == 0) this.x += Math.sin((Game.instance.ticks + (randomMotion * 10)) / 20) / 4;
}
public void render() {
Game.instance.raster.fillSquare((int)this.x, (int)this.y, 2, 2, 0xDDDDDD);
}
}
randomMotion is there to assure roughly 1/8 of all the falling snowflakes are swinging at the same rate and time, which gives it the needed randomness.
And i must say it looks pretty good.