Files
drip/lib/nfp-mucus.js
T
2022-11-13 20:00:23 +00:00

19 lines
425 B
JavaScript

export default function getSensiplanMucus(feeling, texture) {
if (typeof feeling != 'number' || typeof texture != 'number') return null
const feelingMapping = {
0: 0,
1: 1,
2: 2,
3: 4,
}
const textureMapping = {
0: 0,
1: 3,
2: 4,
}
const nfpFeelingValue = feelingMapping[feeling]
const nfpTextureValue = textureMapping[texture]
return Math.max(nfpFeelingValue, nfpTextureValue)
}