O'Reilly logo

DarkBASIC Pro Game Programming, Second Edition by Joshua R. Smith, Jonathan S. Harbour

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Higher Math Commands

In addition to the basic math commands, random numbers, and date/time commands, DarkBASIC also features a set of advanced math commands for trigonometry. However, this is a computer-programming book, not a geometry book, so I don’t have time to explain what all of these commands are used for or exactly how to use them. For instance, while it might not be practical to draw a circle one pixel at a time, you certainly could use circular formulas to move objects around on the screen in a realistic manner using curves and circles.

Sine and Cosine

Sine is the first and most common of the functions associated with trigonometry. Given a section of a circle that resembles a piece of pie, you have an angle associated with that piece, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required