Ver1 | ver2 | ver3 | Ver4 |
---|---|---|---|
1 | |||
12.50 | 87.5 | ||
18.80 | 9.09 | 72.73 | |
50.80 | 49.20 | ||
5.13 | 93.59 | 1.28 |
Created
August 6, 2022 09:46
-
-
Save romero126/8225b0c3b3c39c39adb359141e1a85e2 to your computer and use it in GitHub Desktop.
Scratch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"S": [ | |
{ | |
"N": "G0", | |
"T": 1, | |
"DN": "D0" | |
}, | |
{ | |
"N": "G1", | |
"T": 1, | |
"DN": "D1" | |
}, | |
{ | |
"N": "M0", | |
"T": 3 | |
} | |
], | |
"C": [ | |
0, | |
0, | |
1 | |
] | |
}, | |
{ | |
"C": [ | |
1, | |
1, | |
0.125 | |
] | |
}, | |
{ | |
"C": [ | |
0, | |
0.875 | |
], | |
"R": 1 | |
}, | |
{ | |
"C": [ | |
2, | |
2, | |
"0.18181818181818182" | |
] | |
}, | |
{ | |
"C": [ | |
1, | |
"0.090909090909090912" | |
], | |
"R": 1 | |
}, | |
{ | |
"C": [ | |
0, | |
"0.72727272727272729" | |
], | |
"R": 1 | |
}, | |
{ | |
"C": [ | |
3, | |
1, | |
0.508 | |
] | |
}, | |
{ | |
"C": [ | |
0, | |
0.492 | |
], | |
"R": 1 | |
}, | |
{ | |
"C": [ | |
4, | |
3, | |
"0.05128205128205128" | |
] | |
}, | |
{ | |
"C": [ | |
1, | |
"0.9358974358974359" | |
], | |
"R": 1 | |
}, | |
{ | |
"C": [ | |
0, | |
"0.01282051282051282" | |
], | |
"R": 1 | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Calculate rows if
R=#
$rowoffset = 0
foreach ($element in $elements.where({ $_.R -ne $null}))
{
if ($v.r -eq 1) {
$celloffset = $v.c[-2]
}
$rowoffset += $v.R
calculate this for coords
}
#calculate for everything else it should have 2 args
C.count = 3
$RowOffset, $CellOffset, $Value = $v.C