Вектор определён
This commit is contained in:
@@ -4,6 +4,47 @@
|
||||
#define VECTOR_H
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float x, y;
|
||||
} Vector2;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float x, y, z;
|
||||
} Vector3;
|
||||
|
||||
Vector2 normalizeV2(Vector2* v, float gain);
|
||||
Vector3 normalizeV3(Vector3* v, float gain);
|
||||
|
||||
Vector2 absV2(const Vector2* v);
|
||||
Vector3 absV3(const Vector3* v);
|
||||
|
||||
float lengthV2(const Vector2* v);
|
||||
float lengthV3(const Vector3* v);
|
||||
|
||||
float lengthSquaredV2(const Vector2* v);
|
||||
float lengthSquaredV3(const Vector3* v);
|
||||
|
||||
Vector2 limitV2(float min, float max);
|
||||
Vector3 limitV3(float min, float max);
|
||||
|
||||
Vector2 powerV2(float pow);
|
||||
Vector3 powerV3(float pow);
|
||||
|
||||
Vector2 sumV2(const Vector2* v1, const Vector2* v2);
|
||||
Vector3 sumV3(const Vector3* v1, const Vector3* v2);
|
||||
|
||||
Vector2 diffV2(const Vector2* v1, const Vector2* v2);
|
||||
Vector3 diffV3(const Vector3* v1, const Vector3* v2);
|
||||
|
||||
Vector2 constProdV2(float value);
|
||||
Vector3 constProdV3(float value);
|
||||
|
||||
float scalarProdV2(const Vector2* v1, const Vector2* v2);
|
||||
float scalarProdV3(const Vector3* v1, const Vector3* v2);
|
||||
|
||||
Vector2 vectorProdV2(const Vector2* v1, const Vector2* v2);
|
||||
Vector3 vectorProdV3(const Vector3* v1, const Vector3* v2);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user