> Not a slow routine, I'd expect. And as such, the kind of routine one would >expect in a library (again - apart maybe from the 4-byte input), wouldn't you >agree?
I would have stood up on my back paws and roared if I had found a function which I felt was wrong in a library. For tone generation, accuracy is not that important. For general math, or for graphics, it is! If I had written a general-purpose-sine-function, it would have not differed much from Watty's function. And the function as such is not that slow - but it's usage was too slow for me then. I did increase speed mainly by using values from 0 to 255 instead of 0 to 359: Using a byte instead of a word increases speed for additions. If 360 or more was reached, I would have to do a word comparison and then subtractions to set the value back in the range 0-359. This is all automatically wrapped by a simple byte overflow. Greets, Kiste -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
