From eed8ba49ab981db15c8341e418f023420bcea72d Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 17 May 2021 14:22:19 +0200 Subject: [PATCH] hyperpoint:: added dot_d function --- hyperpoint.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hyperpoint.cpp b/hyperpoint.cpp index 3e753a03..0998d148 100644 --- a/hyperpoint.cpp +++ b/hyperpoint.cpp @@ -96,11 +96,15 @@ struct hyperpoint : array { ); } - // inner product - inline friend ld operator | (hyperpoint h1, hyperpoint h2) { + friend ld dot_d(int c, hyperpoint h1, hyperpoint h2) { ld sum = 0; - for(int i=0; i