summaryrefslogtreecommitdiffstats
path: root/include/astra/cuda/3d
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2021-11-17 14:38:49 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2021-11-17 14:40:40 +0100
commitadc5ce9957ba2d36aa0521880b02c8aa665efbea (patch)
treee37b0853aacb731147c9dc7d3b26caba3c9da044 /include/astra/cuda/3d
parent767eb40a970f981838ea1f0263ba968ae167f91f (diff)
downloadastra-adc5ce9957ba2d36aa0521880b02c8aa665efbea.tar.gz
astra-adc5ce9957ba2d36aa0521880b02c8aa665efbea.tar.bz2
astra-adc5ce9957ba2d36aa0521880b02c8aa665efbea.tar.xz
astra-adc5ce9957ba2d36aa0521880b02c8aa665efbea.zip
Add Vec3 operator* utility function
Diffstat (limited to 'include/astra/cuda/3d')
-rw-r--r--include/astra/cuda/3d/util3d.h3
1 files changed, 3 insertions, 0 deletions
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);
}