Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: 25LCxxx_SPI CommonTypes Gameduino mbed
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
Generated on Tue Jul 12 2022 21:10:35 by
1.7.2