Computes the sinusoid function.