Skip to content

Commit c1a084c

Browse files
committed
Example: SCR building areas -- avoiding re-defining S
1 parent 6373f92 commit c1a084c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

scafi-web/src/main/scala/it/unibo/scafi/js/code/HighLevelExamples.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ object HighLevelExamples {
7676
|}
7777
|val radius = 500
7878
|def mapToHex(x: Double) = remap(0, radius, 255, 16, x).toLong.toHexString
79-
|def S(grain: Double, metric: Metric): Boolean =
80-
| breakUsingUids(randomUid, grain, metric)
79+
|
8180
|val leader = S(radius, nbrRange)
8281
|val distance = distanceTo(leader)
8382
|val ledColor = mux(leader) { "red" } { s"#0000${mapToHex(distance)}" }

0 commit comments

Comments
 (0)