2009-06-06から1日間の記事一覧

C++でJavaのMathクラスみたいなやつを

C++

とりあえずここまで作った #ifndef UTILMATH_H #define UTILMATH_H #include <time.h> class UtilMath { public: UtilMath() { srand(time(NULL)); // 乱数の種を生成 } const static float pi = 3.1415926535f; float toDegrees(float radians) { return radians * </time.h>…