Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple formulas to convert weights
Message
 
 
À
Tous
Information générale
Forum:
Science & Medicine
Catégorie:
Mathématiques
Titre:
Simple formulas to convert weights
Divers
Thread ID:
01627170
Message ID:
01627170
Vues:
64
Hi everybody,

I just spent about 15 minutes googling and could not find simple formulas I need to implement for conversions of kg into pounds or stones and pounds, pounds into the other 2 and stone and pounds into the other two.

Here is what I started to write but I can not find the formulas to use:
 $scope.updateWeight = function(weight1, weight2, units)
            {

                switch (units) {
                    case 'kg':
                        $scope.currentGuest.weightG = weight1 * 1000;
                        $scope.currentGuest.weight = Math.round(weight1 * 2.20462); // weight in pounds
                        $scope.currentGuest.weightStone = Math.round(weight1 * 0.15747); // weight in stones
                        $scope.currentGuest.weigthLbs = // remainder for stones/pounds
                        break;
                    case 'lbs':
                        
                        break;

                    case 'stones': // stones and pounds
                        break;
                }
            }
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform