Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///@description Wave(from, to, duration, offset);
- /// @function Wave
- /// @param from
- /// @param to
- /// @param duration
- /// @param offset
- // Returns a value that will wave back and forth between [from ~ to] over [duration] seconds
- // Examples:
- //image_angle = Wave(-45, 0, 1, 0) -> rock back and forth 90 degrees in a second
- // x = Wave(-10, 10, 0.25, 0) -> move left and right quickly
- var a4 = (argument1 - argument0) * 0.5;
- return argument0 + a4 + sin((((current_time * 0.001) + argument2 * argument3) / argument2) * (pi * 2)) * a4;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement