Skip to content

Instantly share code, notes, and snippets.

@animoplex
Created April 16, 2018 16:02
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save animoplex/d6c1135947b109133a90e8cb50141378 to your computer and use it in GitHub Desktop.
Save animoplex/d6c1135947b109133a90e8cb50141378 to your computer and use it in GitHub Desktop.
JavaScript Math Methods - After Effects Expression by Animoplex
// JavaScript Math Methods - Created by Animoplex: www.animoplex.com
// List of math methods for After Effects expressions and what they output.
// Note: You must capitalize the M in Math for these methods to work properly.
Math.abs(-2) // Returns 2
Math.ceil(1.01) // Returns 2
Math.floor(1.99) // Returns 1
Math.min(1, 2, 3) // Returns 1
Math.max(1, 2, 3) // Returns 3
Math.round(1.49) // Returns 1
Math.PI // Returns 3.141592 and so on, useful for circles
Math.sin() // Trigonometry function
Math.cos() // Trigonometry function
Math.tan() // Trigonometry function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment