You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
580 B

#include "GMath.h"
#include "CArrayBuffer.h"
#include "CDataView.h"
#include "CFloat32Array.h"
int main() {
float x1 = 0.0;
float y1 = 0.0;
float z1 = 1.0;
float x2 = 0.0;
float y2 = 1.0;
float z2 = 0.0;
float x3 = 12.0;
float y3 = 10.0;
float z3 = 12.0;
GVector3 v1(x1, y1, z1);
GVector3 v2(x2, y2, z2);
GVector3 v3(x3, y3, z3);
GVector t = v1 ^ v2;
float m = t * v3;
cout << m << endl;
float a[] = {
x1, x2, x3,
y1, y2, y3,
z1, z2, z3
};
GMatrix M1(3, 3, a);
cout << Det(M1) << endl;
return 0;
}