1
0
Fork 0

fix(docs): Update utils.stretchToScale()

This commit is contained in:
Benjamin F 2022-12-29 19:36:27 -08:00
parent de00e16f76
commit d8738a2e5c

View file

@ -15,9 +15,13 @@ float utils.stretchToScale(float stretch)
The way people measure stretch intuitively is different from the way we handle stretch in code.
When people say _25% stretch_ they mean that 10 cm fabric gets stretched to 12.5 cm fabric.
In code and on our patterns, that means we need to scale things by 80%.
When people say fabric has _25% stretch_ they mean that 10 cm of fabric can
stretch to 12.5 cm.
In code that means we would need to scale non-stretch lengths by 80%
to get the correct lengths to use in patterns with 25% stretch fabric.
Pattern designers need a way to calculate the scaling factor to use for
their pattern part lengths, given a fabric stretch percentage.
This function does that by returning:
```js