Skip to content

Commit

Permalink
Fixing anyOne implementation for Ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
PalumboN committed Oct 2, 2016
1 parent 18b1c9c commit ad0c325
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions org.uqbar.project.wollok.lib/src/wollok/lang/Range.xtend
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.uqbar.project.wollok.interpreter.core.WollokObject
import static org.uqbar.project.wollok.sdk.WollokDSK.*

import static extension org.uqbar.project.wollok.interpreter.nativeobj.WollokJavaConversions.*
import static extension org.uqbar.project.wollok.utils.XtendExtensions.*

/**
*
Expand Down Expand Up @@ -46,7 +47,6 @@ class Range extends AbstractJavaWrapper<IntegerRange> {

def anyOne() {
val wrapped = initWrapped()
((Math.random * (wrapped.end - wrapped.start)) + wrapped.start).intValue()
wrapped.toList.random
}

}

0 comments on commit ad0c325

Please sign in to comment.