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.
Dependents: RETRO_BallsAndPaddle RETRO_BallAndHoles
Vector.h
00001 #pragma once 00002 #include "mbed.h" 00003 00004 class Vector 00005 { 00006 public: 00007 float x; 00008 float y; 00009 00010 Vector(); 00011 Vector(float fX, float fY); 00012 void set(float fX, float fY); 00013 void set(int nX, int nY); 00014 float getSize(); 00015 bool isLeft(); 00016 bool isRight(); 00017 bool isUp(); 00018 bool isDown(); 00019 void add(float fAdd); 00020 void add(Vector vAdd); 00021 void multiply(Vector vMult); 00022 Vector getNormal(); 00023 Vector getNormalized(); 00024 void bounce(Vector vBounce); 00025 };
Generated on Thu Jul 14 2022 10:55:45 by
1.7.2