Add array sizes to math functions
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user