Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple formulas to convert weights
Message
From
06/11/2015 14:22:20
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
General information
Forum:
Science & Medicine
Category:
Mathematics
Miscellaneous
Thread ID:
01627170
Message ID:
01627174
Views:
50
>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;
>                }
>            }
A metric pound is half a kg? But it's marked as deprecated for ages.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform