Skip to content

Commit 62a831c

Browse files
Peter BradyThePhD
authored andcommitted
correct dot product in example
1 parent 874c8e5 commit 62a831c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples/source/usertype_special_functions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ struct vec {
1717
};
1818

1919
double dot(const vec& left, const vec& right) {
20-
return left.x * right.x + left.x * right.x;
20+
return left.x * right.x + left.y * right.y;
2121
}
2222

2323
vec operator+(const vec& left, const vec& right) {

0 commit comments

Comments
 (0)