miijs
Version:
The most complete and easy to use Mii library available.
3 lines (2 loc) • 965 B
JavaScript
import{g as M}from"./chunk-VMLSR5BU.js";M();function s(t){let n=36+.3779527559055118*t;return{feet:Math.floor(n/12),inches:Math.round(n%12),totalInches:n,centimeters:Math.round(n*2.54)}}function I(t){return(t-36)*127/48}function f(t){return(Math.round(t/2.54)-36)*127/48}var c=16,e=22,h=35;function a(t){return t<=64?e-(64-t)*(e-c)/64:e+(t-64)*(h-e)/63}function l(t,n){let i=s(t).totalInches,o=a(n);return{pounds:o*(i*i)/703,kilograms:Math.round(o*(i*i)/703*.4535924)}}function m(t,n){let i=s(t).totalInches,o=n*703/(i*i);return o<=e?64-64*(e-o)/(e-c):64+63*(o-e)/(h-e)}function d(t,n){let i=Math.round(t/2.54),o=Math.round(n/.4535924),u=s(i).totalInches,r=o*703/(u*u);return r<=e?64-64*(e-r)/(e-c):64+63*(r-e)/(h-e)}export{f as centimetersToMiiHeight,m as imperialHeightWeightToMiiWeight,I as inchesToMiiHeight,d as metricHeightWeightToMiiWeight,s as miiHeightToMeasurements,l as miiWeightToMeasurements};
//# sourceMappingURL=miiMeasureConversion-FX6GZ3HU.js.map