See the Microsoft link below re: fmodf
As a self-confessdd noon you should learn the power of self-help & look at the supplied docs. You can also search this forum as most everything has been covered before inc. pitch.
Simple Drawing Routines (Again :) )