Light Show library for organic, calm, light display.
Dependencies: BLE_API mbed nRF51822
Fork of mbed_blinky by
sinusoid.h
- Committer:
- nargetdev
- Date:
- 2016-01-30
- Revision:
- 24:52319c0a14b8
- Child:
- 25:d48f46d753fd
File content as of revision 24:52319c0a14b8:
#ifndef SINUSOID_H #define SINUSOID_H class Sinusoid { public: /** Get value of Sinusoid * Returns a float between 0 and 1 * - This value is zero if time is < wait **/ float get_y(); private: Sinusoid(float wait, float frequency); long int time; // PI macros static const float INCREMENT = 0.00628*4; static const float HPI = 1.571; static const float PI = 3.1416; float wait; // before this y is zero float frequency; }; #endif