diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-01-20 07:24:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-01-20 08:15:53 +0300 |
commit | 255c850e0be3c1ca8676e2dcdc316232f646da96 (patch) | |
tree | 4b9e749db61a686cf8dbee5e91d4276c22c1642d /source/blender/blenlib/intern/voxel.c | |
parent | b2a6e2abdb572f4db801a29423c001d3da307f9d (diff) |
Cleanup: spelling
Diffstat (limited to 'source/blender/blenlib/intern/voxel.c')
-rw-r--r-- | source/blender/blenlib/intern/voxel.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/voxel.c b/source/blender/blenlib/intern/voxel.c index eac01a0e2aa..c0c895654e3 100644 --- a/source/blender/blenlib/intern/voxel.c +++ b/source/blender/blenlib/intern/voxel.c @@ -54,12 +54,14 @@ BLI_INLINE int FLOORI(float x) return ((x >= 0.0f) || (float)r == x) ? r : (r - 1); } -/* clamp function, cannot use the CLAMPIS macro, +/** + * clamp function, cannot use the CLAMPIS macro, * it sometimes returns unwanted results apparently related to - * gcc optimization flag -fstrict-overflow which is enabled at -O2 + * gcc optimization flag `-fstrict-overflow` which is enabled at `-O2` * * this causes the test (x + 2) < 0 with int x == 2147483647 to return false (x being an integer, - * x + 2 should wrap around to -2147483647 so the test < 0 should return true, which it doesn't) */ + * x + 2 should wrap around to -2147483647 so the test < 0 should return true, which it doesn't). + */ BLI_INLINE int64_t _clamp(int a, int b, int c) { return (a < b) ? b : ((a > c) ? c : a); |