From 0ff4feab022a69a882d4948a5113bbe79b380e06 Mon Sep 17 00:00:00 2001 From: Autumin Date: Mon, 12 Dec 2016 16:31:55 +0800 Subject: [PATCH] libobs/graphics: Fix the 2D vector dot product func The operators were unintentionally reversed. Closes jp9000/obs-studio#724 --- libobs/graphics/vec2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libobs/graphics/vec2.h b/libobs/graphics/vec2.h index 880657771..f06bc8019 100644 --- a/libobs/graphics/vec2.h +++ b/libobs/graphics/vec2.h @@ -106,7 +106,7 @@ static inline void vec2_neg(struct vec2 *dst, const struct vec2 *v) static inline float vec2_dot(const struct vec2 *v1, const struct vec2 *v2) { - return (v1->x+v2->x) * (v1->y+v2->y); + return v1->x*v2->x + v1->y*v2->y; } static inline float vec2_len(const struct vec2 *v)