1 9 package org.nfunk.jep.function; 10 11 import java.lang.Math ; 12 import java.util.*; 13 import org.nfunk.jep.*; 14 17 public class Random extends PostfixMathCommand 18 { 19 public Random() 20 { 21 numberOfParameters = 0; 22 23 } 24 25 public void run(Stack inStack) 26 throws ParseException 27 { 28 checkStack(inStack); inStack.push(new Double (Math.random())); 30 return; 31 } 32 } 33 | Popular Tags |