source: trunk/test/math/poly.cpp @ 2720

Last change on this file since 2720 was 2720, checked in by sam, 7 years ago

test: remove dead code in an old test.

  • Property svn:keywords set to Id
File size: 1.0 KB
Line 
1//
2// Lol Engine - Sample math program: chek trigonometric functions
3//
4// Copyright: (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
5//   This program is free software; you can redistribute it and/or
6//   modify it under the terms of the Do What The Fuck You Want To
7//   Public License, Version 2, as published by Sam Hocevar. See
8//   http://www.wtfpl.net/ for more details.
9//
10
11#if defined HAVE_CONFIG_H
12#   include "config.h"
13#endif
14
15#include <cstdio>
16
17#include "core.h"
18
19using namespace lol;
20using namespace std;
21
22mat4 multiply_copy(mat4 m1, mat4 m2, mat4 m3)
23{
24    return m1 * m2 * m3;
25}
26
27mat4 multiply_ref(mat4 const &m1, mat4 const &m2, mat4 const &m3)
28{
29    return m1 * m2 * m3;
30}
31
32int main(int argc, char **argv)
33{
34    UNUSED(argc, argv);
35
36    mat4 a = mat4::rotate(0.1f, vec3(1.f, 1.f, 0.f));
37    mat4 b = mat4::rotate(0.1f, vec3(0.f, 0.f, 1.f));
38    mat4 m = mat4(1.f);
39
40    for (int i = 0; i < 40000000; ++i)
41        //m = multiply_copy(a, m, b);
42        m = multiply_ref(a, m, b);
43    m.printf();
44
45    return EXIT_SUCCESS;
46}
47
Note: See TracBrowser for help on using the repository browser.