glMatrix.toRadian(x)

So, I've been trying to find a solution to this error: 'toRadian' is not defined. I'm not using the minified version of glMatrix, and I am using version 3.0.0

Code: glMatrix.mat4.perspective(projectionMatrix, toRadian(45), canvas.width / canvas.height, .1, 1000.);

I've went through the source, and it is there. I'm not sure why this is happening but for right now, I've had to hardcode: 45 * Math.PI / 180, which I shouldn't really be doing because it just looks awful.

If someone could help me out, I'd really appreciate it. Thank you :)


The answer is: glMatrix.glMatrix.toRadian(x);. Not sure why they'd change it without providing new documentation but here you go if you need it :)