As $\sin(\omega t + \phi)=\sin(\omega t) \cos(\phi)+\sin(\phi)\cos(\omega t)$.  $\phi$ is the lead angle.  As you say, $\cos(\omega t)=\frac{1}{\omega}\frac{d\sin(\omega t)}{dt}$.  So $\sin(\omega t + \phi)=\sin(\omega t) \cos(\phi)+\frac{\sin(\phi)}{\omega}\frac{d\sin(\omega t)}{dt}$.  Is this what you were looking for?

Mathematics of a leading signal for a sine wave
Is there any way to actually see the source code of standard java classes by the way? I'm making a hash table of points (HashSet&lt;Point&gt;) and I want to make sure that it will hash well, but I can't see what Point's hashCode() method actually looks like, so I don't know how good it really is. Can anyone help me? Should I override it? And if so, is there an easy way to do this without creating a whole new java file/class?
