bitshifter / glam-rs

A simple and fast linear algebra library for games and graphics
Apache License 2.0
1.55k stars 159 forks source link

Perhaps refer users to Rust's f32 primitive's to_radians() in Quat functions' documentation? #143

Closed TheLeonsver1 closed 3 years ago

TheLeonsver1 commented 3 years ago

I'm a new user of the rust language and I didn't know the functions to convert between angles and radians existed on the math primitives while trying to use the bevy engine which is using glam's types and functions,

the documentation currently says for example: Creates a quaternion from the angle (in radians) around the z axis. it might be cool if it could also say on a new line something like, you can convert angles to radians using f32::to_radians() or something like that. thank you for considering it :).

bitshifter commented 3 years ago

My only reservation is that there are a lot of places in glam with angle parameters, so this could add quite a bit of noise to the documentation. Perhaps there is a suitable introductory place where I could mention this?

bitshifter commented 3 years ago

I've added a mention of angles being in radians and being able to use to_radians in the main lib docs, rather than on every method. Hopefully that's a slight improvement.

TheLeonsver1 commented 3 years ago

Thank you very much!