Skip to main content
deleted 6 characters in body
Source Link
stib
  • 13.8k
  • 1
  • 34
  • 55

After Effects (as of version 16, released 2020) uses the V8 Javascript engine to interpret expressions. This is the same as used in many web browsers, such as Chrome.

It's pretty easy to test if it follows BODMAS (The O in which stands for Order BTW). On a text layer alt / opt-click the stop watch for text source and paste this:

let brackets = 2 * (1 + 1);
let order = 1 + Math.pow(2, 2) + 1;;
let divMult = 1 + 2 * 2 + 4 / 2;
"Brackets: 2 * (1 + 1) should be 4, result: " + brackets +  
"\n" +
  "Order: 2^21 + 12^2 should equal 5, result: " + order + "\n" + 
"Division and Multiplication: 1 + 2 * 2 + 4 / 2 should equal 7, result: " + divMult + "\n"

Spoiler alert: it does. result of entering the expression in a text layer, showing correct results for BODMASresult of entering the expression in a text layer, showing correct results for BODMAS

After Effects (as of version 16, released 2020) uses the V8 Javascript engine to interpret expressions. This is the same as used in many web browsers, such as Chrome.

It's pretty easy to test if it follows BODMAS (The O in which stands for Order BTW). On a text layer alt / opt-click the stop watch for text source and paste this:

let brackets = 2 * (1 + 1);
let order = Math.pow(2, 2) + 1;
let divMult = 1 + 2 * 2 + 4 / 2;
"Brackets: 2 * (1 + 1) should be 4, result: " + brackets + "\n" +
 "Order: 2^2 + 1 should equal 5, result: " + order + "\n" + 
"Division and Multiplication: 1 + 2 * 2 + 4 / 2 should equal 7, result: " + divMult + "\n"

Spoiler alert: it does. result of entering the expression in a text layer, showing correct results for BODMAS

After Effects (as of version 16, released 2020) uses the V8 Javascript engine to interpret expressions. This is the same as used in many web browsers, such as Chrome.

It's pretty easy to test if it follows BODMAS (The O in which stands for Order BTW). On a text layer alt / opt-click the stop watch for text source and paste this:

let brackets = 2 * (1 + 1);
let order = 1 + Math.pow(2, 2);
let divMult = 1 + 2 * 2 + 4 / 2;
"Brackets: 2 * (1 + 1) should be 4, result: " + brackets +  
"\n" + "Order: 1 + 2^2 should equal 5, result: " + order + "\n" + 
"Division and Multiplication: 1 + 2 * 2 + 4 / 2 should equal 7, result: " + divMult

Spoiler alert: it does. result of entering the expression in a text layer, showing correct results for BODMAS

Source Link
stib
  • 13.8k
  • 1
  • 34
  • 55

After Effects (as of version 16, released 2020) uses the V8 Javascript engine to interpret expressions. This is the same as used in many web browsers, such as Chrome.

It's pretty easy to test if it follows BODMAS (The O in which stands for Order BTW). On a text layer alt / opt-click the stop watch for text source and paste this:

let brackets = 2 * (1 + 1);
let order = Math.pow(2, 2) + 1;
let divMult = 1 + 2 * 2 + 4 / 2;
"Brackets: 2 * (1 + 1) should be 4, result: " + brackets + "\n" +
"Order: 2^2 + 1 should equal 5, result: " + order + "\n" + 
"Division and Multiplication: 1 + 2 * 2 + 4 / 2 should equal 7, result: " + divMult + "\n"

Spoiler alert: it does. result of entering the expression in a text layer, showing correct results for BODMAS