From 62a831cda72cb7dbb6eaadfc9f771febc49fa0e3 Mon Sep 17 00:00:00 2001 From: Peter Brady Date: Wed, 10 Jun 2020 16:59:02 -0600 Subject: [PATCH] correct dot product in example --- examples/source/usertype_special_functions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/source/usertype_special_functions.cpp b/examples/source/usertype_special_functions.cpp index f600445c..e9f57986 100644 --- a/examples/source/usertype_special_functions.cpp +++ b/examples/source/usertype_special_functions.cpp @@ -17,7 +17,7 @@ struct vec { }; double dot(const vec& left, const vec& right) { - return left.x * right.x + left.x * right.x; + return left.x * right.x + left.y * right.y; } vec operator+(const vec& left, const vec& right) {