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.

54 lines
797 B

#include "GMath.h"
#include "CArrayBuffer.h"
#include "CDataView.h"
int main() {
CArrayBuffer buffer(16);
CDataView view0(&buffer, 0, buffer.byteLength());
view0.setFloat32(8, 99.99);
view0.setUint16(8 + 4, 2048);
printf("%f\n", view0.getFloat32(8));
printf("%d\n", view0.getUint16(8+4));
CDataView view1(&buffer, 8, 18);
printf("%f\n", view1.getFloat32(0));
printf("%d\n", view1.getUint16(4));
/*float a[] = {
2, 2, 2, 2,
3, 3, 3, 3,
4, 4, 4, 4,
5, 5, 5, 5
};
GMatrix A(4, 4, a);
float b[] = {
2,
2,
2,
2
};
GMatrix B(4, 1, b);
cout << A*B << endl;*/
/*float a[] = {
1,0,
1,4
};
GMatrix A(2, 2, a);
float c[] = {
0,1,
1,0
};
GMatrix C(2, 2, c);
cout << A*A << endl;*/
return 0;
}