Use a look-up table in SinWave class.