Can't find glm::roundMultiple()

I am trying to use the glm::roundMultiple() function (docs here). However, my editor is giving me the error “namespace “glm” has no member “roundMultiple.”” How do I use this function or is it just not actually there?


void ofApp::setup() {
    cout << glm::roundMultiple(20, 40); // error: "namespace "glm" has no member "roundMultiple.""

try #include <glm/gtc/round.hpp>

1 Like


great! as you discovered not everything is included with ofMain.h.

when something is missing (either core or an addon) try searching the docs of the source package – in this case, glm: 0.9.9 API documenation: GLM_GTC_round states the #include is required.

that being said, that info should be present in the OF version of the docs!

1 Like