Skip to content

Commit

Permalink
🔀 Add utilities for vector
Browse files Browse the repository at this point in the history
This introduces some new utilities for the vector type:

* Optional ostream utilities for debugging purposes,
* structured-bindings support for C++17,
* A `comparison_tolerance` member on each respective class to enable
  an easier upgrade path for custom tolerances

Additionally, this also modernizes the various vector sources, and
introduces a script to simplify modernizing future files.
  • Loading branch information
bitwizeshift committed Sep 5, 2020
2 parents e8cd4e4 + 08b86ec commit 7b2885b
Show file tree
Hide file tree
Showing 12 changed files with 1,007 additions and 717 deletions.
6 changes: 3 additions & 3 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: true
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: true
Expand Down Expand Up @@ -90,7 +90,7 @@ IncludeIsMainRegex: '(\.test)?$'
IndentCaseLabels: false
IndentPPDirectives: AfterHash
IndentWrappedFunctionNames: true
KeepEmptyLinesAtTheStartOfBlocks: true
KeepEmptyLinesAtTheStartOfBlocks: false

MacroBlockBegin: ''
MacroBlockEnd: ''
Expand Down Expand Up @@ -129,5 +129,5 @@ SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: true
SpacesInParentheses: false
SpacesInSquareBrackets: false
4 changes: 2 additions & 2 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Checks: 'clang-diagnostic-*,clang-analyzer-*,bugprone-*,cppcoreguidelin
WarningsAsErrors: 'clang-diagnostic-*,clang-analyzer-*,bugprone-*,cppcoreguidelines-*,readability-*,portability-*,performance-*,misc-*'
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
FormatStyle: llvm
FormatStyle: file
User: bitwize
CheckOptions:
- key: bugprone-argument-comment.StrictMode
Expand Down Expand Up @@ -89,7 +89,7 @@ CheckOptions:
- key: modernize-loop-convert.MinConfidence
value: reasonable
- key: modernize-loop-convert.NamingStyle
value: CamelCase
value: snake_case
- key: modernize-pass-by-value.IncludeStyle
value: llvm
- key: modernize-replace-auto-ptr.IncludeStyle
Expand Down
1 change: 1 addition & 0 deletions lib/alloy-core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ set(header_files
include/alloy/core/math/trigonometry.hpp
include/alloy/core/math/vector.hpp
include/alloy/core/math/vector/vector_utilities.hpp
include/alloy/core/math/vector/vector_streams.hpp
include/alloy/core/math/vector/vector2.hpp
include/alloy/core/math/vector/vector3.hpp
include/alloy/core/math/vector/vector4.hpp
Expand Down
Loading

0 comments on commit 7b2885b

Please sign in to comment.