1
0
Fork 0

Added measurementDiffers method to utils

This commit is contained in:
Joost De Cock 2019-09-01 19:09:36 +02:00
parent 037c66bfa5
commit ea4ce04936
5 changed files with 19 additions and 5 deletions

View file

@ -0,0 +1,11 @@
import neckstimate from '../neckstimate'
// This returns how many sizes a measurement differs from the neckstimate value
const measurementDiffers = (
neckCircumference,
measurementName,
measurementValue,
breasts = false
) => Math.abs(Math.round((measurementValue - neckstimate(neckCircumference, measurementName)) / 20))
export default measurementDiffers