How would I use the Random
to get this to print out two decimal places between 27.5 and 4186?:
Your guitar object will need a generateSong()
method which populates the 2D song array with frequencies for all the notes, along with the number of beats for which each note should be held. You aren’t constrained to normal physical rules of guitars: the frequencies you use to generate the notes are random ranging between 27.5 Hz (inclusive) and 4186 Hz (exclusive). Each frequency is displayed with two decimal places accuracy but stored with its full accuracy.
Aucun commentaire:
Enregistrer un commentaire