Espose Zdog.TAU
Closed this issue · 3 comments
vuchl commented
Having the constant exposed for easier rotation handling would be useful
AlexandreBonaventure commented
I don't see really why you would want that. To me, this is out-of-scope, I'm going to close this one. Feel free to tell me your use case anyhow
vuchl commented
From here: https://zzz.dog/api#utilities-tau
A full rotation in radians.
Math.PI * 2
.TAU
is more user-friendly than PI as TAU maps directly to a full rotation.const TAU = Zdog.TAU; // easier to read constant rotate: { y: TAU/4 } // /4 = quarter turn rotate: { y: TAU/2 } // /2 = half turn rotate: { y: TAU*3 } // *3 = 3 full turns```
If you won't add it it's no big deal just thought it would generally bring more of the surface of Zdog to the wrapper library.
AlexandreBonaventure commented
If you use it extensively in templates, it is easy to expose that yourself :
Vue.prototype.TAU = Math.PI * 2
I'd rather left that in userland.