comparison test/dotproduct.d @ 66:0c5f410d973c trunk

[svn r70] Fixed bug where correct calling convention was not set on calling aggregate methods
author lindquist
date Sun, 28 Oct 2007 02:03:42 +0200
parents e116aa1488e6
children d9d5d59873d8
comparison
equal deleted inserted replaced
65:d4a678905d5e 66:0c5f410d973c
15 15
16 int main() 16 int main()
17 { 17 {
18 printf("Dot Product test\n"); 18 printf("Dot Product test\n");
19 19
20 const float f = 0.7071067811865474617f; 20 const f = 0.7071067811865474617;
21 vec3 v = vec3(f,f,0); 21 vec3 v = vec3(f,f,0);
22 vec3 w = vec3(f,0,f); 22 vec3 w = vec3(f,0,f);
23 23
24 v.print("v"); 24 v.print("v");
25 v.print("w"); 25 w.print("w");
26 26
27 auto dp = v.dot(w); 27 auto dp = v.dot(w);
28 printf("v · w = %f\n", dp); 28 printf("v · w = %f\n", dp);
29 assert(dp > 0.4999 && dp < 0.5001); 29 assert(dp > 0.4999 && dp < 0.5001);
30 30