From 399168f3c13fadb41c9fbec8a1b5c56cb6609343 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Wed, 16 Feb 2022 10:28:18 -0600 Subject: BLI: Implement templated math functions for basic types This is meant to complement the `blender::math` functions recently added by D13791. It's sometimes desired to template an operation to work on vector types, but also basic types like `float` and `int`. This patch adds that ability with a new `BLI_math_base.hh` header. The existing vector math header is changed to use the `vec_base` type more explicitly, to allow the compiler's generic function overload resolution to determine which implementation of each math function to use. This is a relatively large change, but it also makes the file significantly easier to understand by reducing the use of macros. Differential Revision: https://developer.blender.org/D14113 --- source/blender/blenlib/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/blenlib/CMakeLists.txt') diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt index 29015084679..e67d673eb73 100644 --- a/source/blender/blenlib/CMakeLists.txt +++ b/source/blender/blenlib/CMakeLists.txt @@ -220,6 +220,7 @@ set(SRC BLI_map.hh BLI_map_slots.hh BLI_math.h + BLI_math_base.hh BLI_math_base.h BLI_math_base_safe.h BLI_math_bits.h -- cgit v1.2.3