diff options
| author | Mikhail Romanko <me@blankhex.com> | 2025-04-29 18:17:00 +0300 |
|---|---|---|
| committer | Mikhail Romanko <me@blankhex.com> | 2025-04-29 18:17:00 +0300 |
| commit | 7ee69fc3979a11d6ded9db33c58913d602360a61 (patch) | |
| tree | 3150662170aebd63f65b217843738b326c4451bf /src/Math/Vec3i.c | |
| parent | 1b6c858a1b6df1b450303ea6ae671ad983ad5fc6 (diff) | |
| download | bhlib-7ee69fc3979a11d6ded9db33c58913d602360a61.tar.gz | |
Add array sizes to math functions
Diffstat (limited to 'src/Math/Vec3i.c')
| -rw-r--r-- | src/Math/Vec3i.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/Math/Vec3i.c b/src/Math/Vec3i.c index c791c09..1b07d7a 100644 --- a/src/Math/Vec3i.c +++ b/src/Math/Vec3i.c @@ -1,9 +1,9 @@ #include <BH/Math.h> -void BH_Vec3iAdd(const int *a, - const int *b, - int *out) +void BH_Vec3iAdd(const int a[3], + const int b[3], + int out[3]) { out[0] = a[0] + b[0]; out[1] = a[1] + b[1]; @@ -11,9 +11,9 @@ void BH_Vec3iAdd(const int *a, } -void BH_Vec3iSub(const int *a, - const int *b, - int *out) +void BH_Vec3iSub(const int a[3], + const int b[3], + int out[3]) { out[0] = a[0] - b[0]; out[1] = a[1] - b[1]; @@ -21,9 +21,9 @@ void BH_Vec3iSub(const int *a, } -void BH_Vec3iMul(const int *a, - const int *b, - int *out) +void BH_Vec3iMul(const int a[3], + const int b[3], + int out[3]) { out[0] = a[0] * b[0]; out[1] = a[1] * b[1]; @@ -31,9 +31,9 @@ void BH_Vec3iMul(const int *a, } -void BH_Vec3iScale(const int *a, +void BH_Vec3iScale(const int a[3], int b, - int *out) + int out[3]) { out[0] = a[0] * b; out[1] = a[1] * b; @@ -41,10 +41,10 @@ void BH_Vec3iScale(const int *a, } -void BH_Vec3iMulAdd(const int *a, - const int *b, - const int *c, - int *out) +void BH_Vec3iMulAdd(const int a[3], + const int b[3], + const int c[3], + int out[3]) { out[0] = a[0] * b[0] + c[0]; out[1] = a[1] * b[1] + c[1]; @@ -52,8 +52,8 @@ void BH_Vec3iMulAdd(const int *a, } -void BH_Vec3iNegate(const int *in, - int *out) +void BH_Vec3iNegate(const int in[3], + int out[3]) { out[0] = -in[0]; out[1] = -in[1]; @@ -61,9 +61,9 @@ void BH_Vec3iNegate(const int *in, } -void BH_Vec3iMin(const int *a, - const int *b, - int *out) +void BH_Vec3iMin(const int a[3], + const int b[3], + int out[3]) { if (a[0] < b[0]) out[0] = a[0]; else out[0] = b[0]; if (a[1] < b[1]) out[1] = a[1]; else out[1] = b[1]; @@ -71,9 +71,9 @@ void BH_Vec3iMin(const int *a, } -void BH_Vec3iMax(const int *a, - const int *b, - int *out) +void BH_Vec3iMax(const int a[3], + const int b[3], + int out[3]) { if (a[0] > b[0]) out[0] = a[0]; else out[0] = b[0]; if (a[1] > b[1]) out[1] = a[1]; else out[1] = b[1]; |
