Simple implementation of 3 dimensional vectors for use in other CMake projects
Find a file
2025-04-16 12:05:23 -04:00
docs Initial commit 2025-04-15 19:07:31 +00:00
include Update scale to return new vector and template out the norm functions 2025-04-16 12:05:23 -04:00
tests Update scale to return new vector and template out the norm functions 2025-04-16 12:05:23 -04:00
.gitignore Add simple Vec3 header file 2025-04-15 17:48:33 -04:00
CMakeLists.txt Guard testing code to avoid problems when including using FetchContent.MakeAvailable 2025-04-16 07:55:10 -04:00
compile_commands.json Add simple Vec3 header file 2025-04-15 17:48:33 -04:00
LICENSE Initial commit 2025-04-15 19:07:31 +00:00
README.md Update README 2025-04-16 08:10:44 -04:00

Vec3

Simple header only library defining a 3 dimensional vector type.

Installation

To use from another CMake project you just need to add the following to your CMakeLists.txt:

include(FetchContent)
FetchContent_Declare(Vec3
    GIT_REPOSITORY https://www.alexselimov.com/git/aselimov/Vec3.git
)

FetchContent_GetProperties(Vec3)
if(NOT Vec3_POPULATED)
    FetchContent_MakeAvailable(Vec3)
    include_directories(${Vec3_SOURCE_DIR}/include)
endif()

Features

  • Guards all testing code to only be run when Vec3 is the main project