maybe the question is trivial, but is there any function to convert a Vec3() to int?
Vec3(1.2, 2.33, 10.123) --> (1, 2, 10)
I know I can use int() or math.floor() but they work on float, not integer.
Since there are many operations that work on vectors out-of-the-box (like +, *, etc…) I wish to know if I can convert Vec3() to int?
Another question: maybe exists a Vec3i()?
(vector 3 containing integer values?)
Unless by “convert a Vec3() to int” you mean “make the components of a Vec3() integers”…in which case you will have to do the above but then add a line to convert the tuple of ints back into a Vec3 instance. Really though, if that’s the case then don’t bother - find a way to ignore the non-ints coming out of the Vec3, or make them ints before they are in the Vec3.