@symbo.ls/scratch 0.7.15 → 0.7.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/utils/color.js +1 -1
- package/src/utils/sequence.js +6 -6
package/package.json
CHANGED
package/src/utils/color.js
CHANGED
package/src/utils/sequence.js
CHANGED
|
@@ -38,8 +38,8 @@ const setSequenceValue = (props, sequenceProps) => {
|
|
|
38
38
|
const { key, variable, value, scaling, index } = props
|
|
39
39
|
sequenceProps.sequence[key] = {
|
|
40
40
|
key,
|
|
41
|
-
decimal:
|
|
42
|
-
val:
|
|
41
|
+
decimal: ~~(value * 100) / 100,
|
|
42
|
+
val: ~~(value),
|
|
43
43
|
scaling,
|
|
44
44
|
index,
|
|
45
45
|
variable
|
|
@@ -55,8 +55,8 @@ export const generateSubSequence = (props, sequenceProps) => {
|
|
|
55
55
|
const diff = next - value
|
|
56
56
|
const smallscale = diff / 1.618
|
|
57
57
|
|
|
58
|
-
const valueRounded =
|
|
59
|
-
const nextRounded =
|
|
58
|
+
const valueRounded = ~~(value)
|
|
59
|
+
const nextRounded = ~~(next)
|
|
60
60
|
const diffRounded = nextRounded - valueRounded
|
|
61
61
|
|
|
62
62
|
let arr = []
|
|
@@ -67,7 +67,7 @@ export const generateSubSequence = (props, sequenceProps) => {
|
|
|
67
67
|
else arr = [first, second]
|
|
68
68
|
|
|
69
69
|
arr.map((v, k) => {
|
|
70
|
-
const scaling =
|
|
70
|
+
const scaling = ~~(v / base * 1000) / 1000
|
|
71
71
|
const newVar = variable + (k + 1)
|
|
72
72
|
|
|
73
73
|
const props = {
|
|
@@ -91,7 +91,7 @@ export const generateSequence = (sequenceProps) => {
|
|
|
91
91
|
const key = range[1] - i
|
|
92
92
|
const letterKey = numToLetterMap[key]
|
|
93
93
|
const value = base * Math.pow(ratio, key)
|
|
94
|
-
const scaling =
|
|
94
|
+
const scaling = ~~(value / base * 1000) / 1000
|
|
95
95
|
const variable = prefix + letterKey
|
|
96
96
|
|
|
97
97
|
const props = {
|