wolftype / versor

Versor Geometric Algebra Library
wolftype.github.io/versor/devel/html/
290 stars 47 forks source link

Example code does not compile #19

Closed rahulsidhu closed 7 years ago

rahulsidhu commented 7 years ago

When trying to compile the example code given in the docs:

#include "vsr.h"

using Vec = vsr::euclidean_vec<3,float>;        //<-- A 3 dimensional euclidean vector defined over floats
using Biv = vsr::euclidean_bivector<3,float>;   //<-- A 3 dimensional bivector or "directed area element"

int main(){

    auto v = Vec(1,2,3);                    //<-- A 3D vector at coordinates 1,2,3;

    v.rotate( Biv::xy * .25 ).print();      //<-- Rotate the vector in the xy plane and print result

    return 0;
};
test.cpp:3:18: error: ‘euclidean_vec’ in namespace ‘vsr’ does not name a template type
 using Vec = vsr::euclidean_vec<3,float>;    //<-- A 3 dimensional euclidean vec
                  ^
test.cpp: In function ‘int main()’:
test.cpp:8:20: error: ‘Vec’ was not declared in this scope
  auto v = Vec(1,2,3);       //<-- A 3D vector at coordinates 1,2,3;
                    ^

Also, if possible please add a barebones example with windows and GUI. Would be very helpful.

wolftype commented 7 years ago

Thanks -- it should read: using Vec = vsr::euclidean_vector<3,float>; I will update the readme, and work on a graphics example as you suggest.

rahulsidhu commented 7 years ago

Thanks!