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

32ビット固定小数3次元ベクトルクラス

C++

#ifndef VECTOR3FIX_H #define VECTOR3FIX_H #include <iostream> #include <math.h> class Vector3fix { public: int x; int y; int z; Vector3fix() : x(0), y(0), z(0) {} Vector3fix(int x, int y, int z) : x(x << 16), y(y << 16), z(z << 16) {} Vector3fix(float x, fl</math.h></iostream>…