adam@media-lab.MEDIA.MIT.EDU (Adam Glass) (07/21/90)
I'm having a devil of a time trying to get a random number out of THINK C. Short of writing my own random function, how can I do it? Every reference to QD's TickCount() or Random() results in a "illegal use of inline Macintosh function" error. Do I have to #include something specific? This *can't* be that difficult... Anyway, any and all information (including teensy code snippets) would be greatly appreciated. I'd prefer replies via mail, I guess. (Oh: and, being fairly C illiterate, I don't really know how to convert my floating point variables into cute little shorts for QD to draw lines with... I've been using "LineTo((short)mx,(short)my);" (is this "type coersion"?) Is there an easier/faster way to convert from float to short?) Thanks in advance. Adam