Anonymous user
Constrained random points on a circle: Difference between revisions
Constrained random points on a circle (view source)
Revision as of 10:40, 12 July 2013
, 10 years ago→{{header|Scala}}
Line 1,989:
preferredSize = (prefSizeX, prefSizeY)
val xmax,ymax = 20; val xmin,ymin = -20
case class Coord(x: Double, y: Double) {
val dx = (((dxm-dx0)/2+x.toDouble/xmax*(dxm-dx0)/2)+dx0).toInt
val dy = (((dym-dy0)/2-y.toDouble/ymax*(dym-dy0)/2)+dy0).toInt
}
Line 2,003 ⟶ 2,001:
val dx = mdp.dx-dr/2
val dy = mdp.dy-dr/2
}
|