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
import scala.tools.nsc.interactive, scala.tools.nsc.reporters._, scala.tools.nsc._ | |
object Test { | |
def main(args: Array[String]): Unit = { | |
val reporter = new StoreReporter | |
val s = new Settings() | |
s.processArgumentString("-Ypresentation-any-thread") | |
val global = new interactive.Global(s, reporter) | |
import global._ | |
val Cursor = ""//"_DUMMY_ " |
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
import math._ | |
val (h, w) = (Page.canvas.height, Page.canvas.width) | |
var x = 0.0 | |
// $FiddleStart | |
val graphs = Seq[(String, Double => Double)]( | |
("red", sin), | |
("green", x => 2 - abs(x % 8 - 4)), | |
("blue", x => 3 * pow(sin(x / 12), 2) * sin(x)) | |
) | |
// $FiddleEnd |