3次元ベクトルクラスVector3ライブラリです。
Dependents: Quaternion HAPS_GPS_Test_0002 GYSFDMAXB HAPS_EKF ... more
Diff: Vector3.hpp
- Revision:
- 1:8e112552bdfc
- Parent:
- 0:deef87aa67a3
- Child:
- 2:33c104711999
- Child:
- 3:3d5d3689521c
diff -r deef87aa67a3 -r 8e112552bdfc Vector3.hpp --- a/Vector3.hpp Wed Jun 07 00:56:18 2017 +0000 +++ b/Vector3.hpp Fri Jun 09 19:54:15 2017 +0000 @@ -24,7 +24,7 @@ double z; /** - * @bref R³xNgÌvfðRs[ + * @bref ï¼æ¬¡å ãã¯ãã«ã®è¦ç´ ãã³ãã¼ */ Vector3 operator=(Vector3 vector){ x = vector.x; @@ -33,7 +33,7 @@ return *this; }; - /** R³xNgð«µÄãü·é*/ + /**ï¼æ¬¡å ãã¯ãã«ã足ãã¦ä»£å ¥ãã Vector3 operator+=(Vector3 vec){ x += vec.x; y += vec.y; @@ -41,7 +41,7 @@ return *this; }; - /** R³xNgðø¢Äãü·é*/ + /**ï¼æ¬¡å ãã¯ãã«ãå¼ãã¦ä»£å ¥ãã*/ Vector3 operator-=(Vector3 vec){ x -= vec.x; y -= vec.y; @@ -49,7 +49,7 @@ return *this; }; - /** R³xNgðOϵÄãü·é*/ + /**ï¼æ¬¡å ãã¯ãã«ãå¤ç©ãã¦ä»£å ¥ãã*/ Vector3 operator*=(Vector3 vec){ double _x = y*vec.z - z*vec.y; double _y = z*vec.x - x*vec.z; @@ -80,20 +80,20 @@ return true; } /** - * @bref Vector3NXÌevfðú»µÜ·B + * @bref Vector3ã¯ã©ã¹ã®åè¦ç´ ãåæåãã¾ãã */ template<typename T>void set(T _x, T _y, T _z); /** - * @bref QÂÌVector3NXÌÈ·pðvZµÜ·. - * @param ©ªÆÌÈ·pxðvZ·éVector3NXÌCX^X + * @bref ï¼ã¤ã®Vector3ã¯ã©ã¹ã®ãªãè§ãè¨ç®ãã¾ã. + * @param èªåã¨ã®ãªãè§åº¦ãè¨ç®ããVector3ã¯ã©ã¹ã®ã¤ã³ã¹ã¿ã³ã¹ */ double Angle(Vector3 v); /** - * @bref [xNg©Ç¤©»èµÜ·. - * @note 0@ðh~·éÌÉgÁľ³¢. - * @return 1Èç[xNgA0Èç[xNgÅÍ èܹñ. + * @bref ã¼ããã¯ãã«ãã©ããå¤å®ãã¾ã. + * @note 0é¤æ³ãé²æ¢ããã®ã«ä½¿ã£ã¦ãã ãã. + * @return 1ãªãã¼ããã¯ãã«ã0ãªãã¼ããã¯ãã«ã§ã¯ããã¾ãã. */ int CheckZero(){ if (x == 0.0 && y == 0.0 && z == 0.0){ @@ -103,12 +103,12 @@ } /** - * @bref ©gÌmðvZµÄԵܷ. + * @bref èªèº«ã®ãã«ã ãè¨ç®ãã¦è¿ãã¾ã. */ double Norm(); /** - * @bref PÊxNgɵܷ + * @bref åä½ãã¯ãã«ã«ãã¾ã */ void Normalize(){ double norm = sqrt(x*x + y*y + z*z); @@ -125,7 +125,7 @@ }; /** -* @bref Vector3NXÌevfÌaðvZµÜ·B +* @bref Vector3ã¯ã©ã¹ã®åè¦ç´ ã®åãè¨ç®ãã¾ãã */ inline Vector3 operator+(Vector3 left, Vector3 right){ static Vector3 vec; @@ -136,7 +136,7 @@ } /** -* @bref Vector3NXÌevfÌ·ðvZµÜ·B +* @bref Vector3ã¯ã©ã¹ã®åè¦ç´ ã®å·®ãè¨ç®ãã¾ãã */ inline Vector3 operator-(Vector3 left, Vector3 right){ static Vector3 vec; @@ -147,8 +147,8 @@ } /** -* @bref Vector3NXÌOÏðvZµÜ·. -* @note OÏÅ·ÌÅÉӵľ³¢. +* @bref Vector3ã¯ã©ã¹ã®å¤ç©ãè¨ç®ãã¾ã. +* @note å¤ç©ã§ãã®ã§é åºã«æ³¨æãã¦ãã ãã. */ inline Vector3 operator*(Vector3 left, Vector3 right){ static Vector3 vec; @@ -159,15 +159,15 @@ } /** -* @bref àÏðvZµÜ· -* @note hbgªg¦È©Á½ÌÅÉÈèܵ½BµÄqVX +* @bref å ç©ãè¨ç®ãã¾ã +* @note ãããã使ããªãã£ãã®ã§ï¼ ã«ãªãã¾ããã許ãã¦ãã¤ã·ã³ã¹ */ inline double operator%(Vector3 left, Vector3 right){ return (left.x * right.x + left.y * right.y + left.z * right.z); } /** -* @bref Vector3NXÌevfðXJ[{µÜ· +* @bref Vector3ã¯ã©ã¹ã®åè¦ç´ ãã¹ã«ã©ã¼åãã¾ã */ inline Vector3 operator*(double scalar, Vector3 vec3){ static Vector3 vec; @@ -178,7 +178,7 @@ } /** -* @bref Vector3NXÌevfðXJ[{µÜ· +* @bref Vector3ã¯ã©ã¹ã®åè¦ç´ ãã¹ã«ã©ã¼åãã¾ã */ inline Vector3 operator*(Vector3 vec3, double scalar){ static Vector3 vec; @@ -189,7 +189,7 @@ } /** -* @bref Vector3NXÌevfðXJ[ÅèÜ· +* @bref Vector3ã¯ã©ã¹ã®åè¦ç´ ãã¹ã«ã©ã¼ã§å²ãã¾ã */ inline Vector3 operator/(Vector3 vec3, double scalar){ static Vector3 vec;