Richard Ellingworth / Mbed 2 deprecated RobotRic

Dependencies:   25LCxxx_SPI CommonTypes Gameduino mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers BulletVelocityCalculator.h Source File

BulletVelocityCalculator.h

00001 /*
00002  * SOURCE FILE : BulletVelocityCalculator.h
00003  *
00004  * Definition of class BulletVelocityCalculator.
00005  * Used to calculate the horizontal and vertical velocities necessary for a bullet to
00006  * hit a target,
00007  *
00008  */
00009 
00010 #ifndef BulletVelocityCalculatorDefined
00011 
00012   #define BulletVelocityCalculatorDefined
00013 
00014     #include "Types.h"
00015     
00016   class BulletVelocityCalculator {
00017 
00018   public :
00019 
00020         /*******************************/
00021         /* CALCULATE BULLET VELOCITIES */
00022         /*******************************/
00023         // Pass distances to target in dx and dy.
00024         // Pass velocity at which bullet moves in v.
00025         // Horizontal and vertical velocities returned in variables pointed to by hv and vv.
00026         static void CalculateVelocities( Int16 dx, Int16 dy, Int16 v, Int16 *hv, Int16 *vv );
00027         
00028   };
00029 
00030 #endif
00031 
00032 /* END of BulletVelocityCalculator.h */
00033