02.01.2019, 19:33
Hi everyone
Trying to do a crossproduct with 2 vectors:
Under OnGameModeInit
It prints properly, however my compiler gives the following warning:
warning 213: tag mismatch for the line: h = crossproduct(x, y);
Any help?
Trying to do a crossproduct with 2 vectors:
Code:
crossproduct(Float:x[], Float:y[]) //vectors 3x1
{
new Float:h[3];
h[0] = x[1] * y[2] - x[2] * y[1];
h[1] = -(x[0] * y[2] - x[2] * y[0]);
h[2] = x[0] * y[1] - y[0] * x[1];
return _:h;
}
Code:
new
Float:x[3] = { 1.0, 2.0, 3.0 },
Float:y[3] = { 4.0, 5.0, 6.0 },
Float:h[3];
h = crossproduct(x, y);
printf("test: %f, %f, %f", h[0], h[1], h[2]);
warning 213: tag mismatch for the line: h = crossproduct(x, y);
Any help?

