From 979364f2749bd460e3913e7f1e176056d8b6e84e Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Mon, 13 May 2024 22:46:26 +0800 Subject: [PATCH] debug --- src/linalg.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/linalg.cpp b/src/linalg.cpp index 678578fe..3de8bb90 100644 --- a/src/linalg.cpp +++ b/src/linalg.cpp @@ -30,17 +30,19 @@ namespace pkpy{ }); #define BIND_VEC_MUL_OP(D) \ - vm->bind__mul__(PK_OBJ_GET(Type, type), [](VM* vm, PyVar _0, PyVar _1){ \ - Vec##D self = _CAST(Vec##D, _0); \ + vm->bind__mul__(PK_OBJ_GET(Type, type), [](VM* vm, PyVar _0, PyVar _1){ \ + Vec##D self = _CAST(Vec##D, _0); \ if(vm->is_user_type(_1)){ \ - Vec##D other = _CAST(Vec##D, _1); \ + Vec##D other = _CAST(Vec##D, _1); \ + std::cout << self.x << ',' << self.y << '\n';\ + std::cout << other.x << ',' << other.y << '\n';\ return VAR(self * other); \ } \ f64 other = CAST(f64, _1); \ return VAR(self * other); \ }); \ - vm->bind_func(type, "__rmul__", 2, [](VM* vm, ArgsView args){ \ - Vec##D self = _CAST(Vec##D, args[0]); \ + vm->bind_func(type, "__rmul__", 2, [](VM* vm, ArgsView args){ \ + Vec##D self = _CAST(Vec##D, args[0]); \ f64 other = CAST(f64, args[1]); \ return VAR(self * other); \ }); \