]> git.jsancho.org Git - guile-irrlicht.git/commitdiff
vector2d
authorJavier Sancho <jsf@jsancho.org>
Sun, 10 May 2020 11:07:17 +0000 (13:07 +0200)
committerJavier Sancho <jsf@jsancho.org>
Sun, 10 May 2020 11:07:17 +0000 (13:07 +0200)
src/vector2d.cpp
src/vector2d.h

index 9e46868239fc79d7577fc99c9a20b442e599b6d2..4e08818ee56dc7cdd520aa23e276b71ca4fd798c 100644 (file)
 #include <libguile.h>
 #include "vector2d.h"
 
-extern "C" {
 
-  irr::core::vector2df
-  scm_to_vector2df (SCM vector2d)
-  {
-    return irr::core::vector2df
-      (scm_to_double (scm_car (vector2d)),
-       scm_to_double (scm_cadr (vector2d)));
-  }
+using namespace irr;
 
+
+core::vector2df
+scm_to_vector2df (SCM vector2d)
+{
+  return core::vector2df
+    (scm_to_double (scm_car (vector2d)),
+     scm_to_double (scm_cadr (vector2d)));
 }
index abf346166b5a91bfea0963800b83ce3e1b97503f..83d6f8b4ac81f7512c763a12e2263edcc778ac40 100644 (file)
 #include <irrlicht/irrlicht.h>
 #include <libguile.h>
 
-extern "C" {
-
-  irr::core::vector2df
-  scm_to_vector2df (SCM vector2d);
-
-}
+irr::core::vector2df
+scm_to_vector2df (SCM vector2d);
 
 #endif