Wicklets / wick-editor-2018

Archived - New repo is now at github.com/wicklets/wick-editor
GNU General Public License v3.0
515 stars 57 forks source link

A few more Math functions? #654

Open ghost opened 7 years ago

ghost commented 7 years ago

I feel like we could have a few more Math functions for now that would help with animation, currently there seems to be only Math.abs()

Basically:

` Math.sin(value); Math.cos(value); Math.tan(value);

Math.min(values, ... ); Math.max(values, ... );

Math.floor(value); Math.ceil(value); Math.round(value);

Math.pow(value, power); Math.sqrt(value);

Math.sign(value);

Math.PI `

bbblitz commented 7 years ago

I'm not certain why Math.abs() is in the documentation for wick, it seems like it's part of most browser's javascript standard library?

zachrispoli commented 7 years ago

Yeah I thought it might be helpful to have the most commonly used javascript functions in the docs for wick, but apparently I never finished them:

screen shot 2017-08-30 at 2 43 39 pm

I don't even know if people should have to use the standard javascript functions, maybe wick should have its own wrappers for the most common things? Any thoughts?