Having problems with glm::rotate and glm::radians

So what I want to do is rotate the model.

this is what I start with

model = glm::translate(glm::mat4(1.0), modelPos[i]) * glm::scale(glm::mat4(1.0), scale)

I want to rotate the roll so I should just be able to use

model = glm::translate(glm::mat4(1.0), modelPos[i]) * glm::scale(glm::mat4(1.0), scale) * glm::rotate(model, glm::radians(therot[i]), glm::vec3(1, 0, 0));

but I get the error that says that it has to be a float for glm::radians

model = glm::translate(glm::mat4(1.0), modelPos[i]) * glm::scale(glm::mat4(1.0), scale) * glm::rotate(model, glm::radians(90.0f), glm::vec3(1, 0, 0));

this does not work when the float aspect is explicitly applied

Has model been initialised? In the first example you’re using an identity matrix as the base transformation, in the second and third you’re using model. Also, if you’re using a base transformation, it would normally be in the left-most function. As written, the code calculates

model = T * S * model * R;

where T, S, R are the translation, scale and rotation matrices respectively.

The first argument is so that you can accumulate transformations in a manner similar to legacy OpenGL, i.e.

glm::mat4 model = glm::mat4(1.0);
model = glm::translate(model, modelPos[i]);
model = glm::scale(model, scale);
model = glm::rotate(model, glm::radians(90.0f), glm::vec3(1, 0, 0));

Each successive translation is appended on the right, so the above calculates model = T * S * R.