Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Calculation in Javascript or FormCalc "to the power"

Avatar

Former Community Member
Hi,



How can I caculate the following expression using either formcalc or javascript. The Expression pow(x,y) doesn't seem to be recognized.



Expression: BSA.rawValue = pow(height.rawValue,0.45) * weight(weight.raxValue,0.72)



or BSA = x^0.45 * y^0.72



I couldn't find the answer in the forum.



Thank you for your help,



Olivio
2 Replies

Avatar

Former Community Member
In Javascript the command should be:



Math.pow(x,y);

Avatar

Former Community Member
Thank you very much for the fast answer.



It works!