Skip to content

Commit 0d973b4

Browse files
committed
Fixed int mod
1 parent 11c26f9 commit 0d973b4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

glm/gtx/integer.inl

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ namespace detail
6666
// mod
6767
GLM_FUNC_QUALIFIER int mod(int x, int y)
6868
{
69-
return x - y * (x / y);
69+
return ((x % y) + y) % y;
7070
}
7171

7272
// factorial (!12 max, integer only)

readme.md

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ glm::mat4 camera(float Translate, glm::vec2 const& Rotate)
5757
5858
#### Fixes:
5959
- Fixed build problems due to printf and std::clock_t #778
60+
- Fixed int mod
6061
6162
### [GLM 0.9.9.0](https://github.com/g-truc/glm/releases/tag/0.9.9.0) - 2018-05-22
6263
#### Features:

0 commit comments

Comments
 (0)