From adc5ce9957ba2d36aa0521880b02c8aa665efbea Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 17 Nov 2021 14:38:49 +0100 Subject: Add Vec3 operator* utility function --- include/astra/cuda/3d/util3d.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/astra/cuda/3d') diff --git a/include/astra/cuda/3d/util3d.h b/include/astra/cuda/3d/util3d.h index e147e42..9fa254d 100644 --- a/include/astra/cuda/3d/util3d.h +++ b/include/astra/cuda/3d/util3d.h @@ -78,6 +78,9 @@ struct Vec3 { Vec3 operator-() const { return Vec3(-x, -y, -z); } + Vec3 operator*(double s) { + return Vec3(s*x, s*y, s*z); + } double norm() const { return sqrt(x*x + y*y + z*z); } -- cgit v1.2.3