/**************** Added to make it work outside my app ***/
var Sexe = "Homme";
var age = 57;
var Poids = 105;
var Taille = 196;
/******************************************************/
Taille = Taille > 100 ? Taille / 100 : Taille;
/********************* Formules ***************************/
var FormuleFemme = "Kcal =[0,963 x Poids<sup>0,48</sup> x Taille<sup>0,50</sup> x Age<sup>-0,13</sup>] x (1000/4,1855)";
var FormuleHomme = "Kcal =[1,083 x Poids<sup>0,48</sup> x Taille<sup>0,50</sup> x Age<sup>-0,13</sup>] x (1000/4,1855)";
$("#MessCalBasalGood").show();
var K1H = 1.083;
var K1F = 0.963;
var ActSed = 1.375;
var ActAL = 1.56;
var ActAM = 1.64;
var ActAI = 1.82;
var K2HF = Math.pow(Poids, 0.48);
var K3HF = Math.pow(Taille, 0.50);
var K4HF = Math.pow(age, -0.13);
var K4HF2 = K4HF.toFixed(2);
var K5HF = (1000 / 4.1855);
var KcalH = ((K1H * K2HF * K3HF * K4HF) * K5HF);
var KcalF = ((K1F * K2HF * K3HF * K4HF) * K5HF);
var NbCalHActSed = KcalH * ActSed;
var NBCalHActAL = KcalH * ActAL;
var NBCalHActAM = KcalH * ActAM;
var NBCalHActAI = KcalH * ActAI;
var NbCalFActSed = KcalF * ActSed;
var NBCalFActAL = KcalF * ActAL;
var NBCalFActAM = KcalF * ActAM;
var NBCalFActAI = KcalF * ActAI;
...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Fiddle Pages
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Get Fiddle Pages with PRO
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.