-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🧪 labs: Rework random rectangle generation (#462)
Rework random rectangle generation to avoid rounding differences on Mac and Linux. This is not going to the bottom of the problem, just making the build pass again on mac for now. Additionally a vulnerability has been found by govulncheck in the crypto stdlib. An upgrade with `hermit upgrade go` from 1.23.5 to 1.23.6 fixes the build. This merges the following commits: * e2e: Add slight pixel tolerance to no-diagonal test * tools: Upgrade go * labs: Rework random rectangle generation bin/{.go-1.23.5.pkg => .go-1.23.6.pkg} | 0 bin/go | 2 +- bin/gofmt | 2 +- e2e/play/test.js | 2 +- frontend/lab/samples/ifs/img/randrect.evy | 16 +- frontend/lab/samples/ifs/img/randrect.svg | 420 ++++------------------ 6 files changed, 75 insertions(+), 367 deletions(-) Pull-request: #462
- Loading branch information
Showing
6 changed files
with
75 additions
and
367 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
.go-1.23.5.pkg | ||
.go-1.23.6.pkg |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
.go-1.23.5.pkg | ||
.go-1.23.6.pkg |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
fill (hsl 270 100 50 10) | ||
width 0.2 | ||
for range 60 | ||
x := (rand1) * 100 | ||
y := (rand1) * 100 | ||
s1 := (rand1) * 25 + 2 | ||
s2 := (rand1) * 25 + 2 | ||
x := roundedRand1 * 100 | ||
y := roundedRand1 * 100 | ||
s1 := roundedRand1 * 25 + 2 | ||
s2 := roundedRand1 * 25 + 2 | ||
|
||
move x-s1*0.5 y-s2*0.5 | ||
rect s1 s2 | ||
end | ||
|
||
// roundedRand1 is a rounding rand1 function, to avoid rounding differences on | ||
// Mac and Linux. | ||
func roundedRand1:num | ||
r := rand1 * 1024 | ||
r = round r | ||
return r / 1024 | ||
end |
Oops, something went wrong.