View Javadoc

1   package com.tapina.robe.swi.clib.stdlib;
2   
3   import com.tapina.robe.runtime.Environment;
4   import com.tapina.robe.swi.clib.Stub;
5   
6   /***
7    * Created by IntelliJ IDEA.
8    * User: gareth
9    * Date: 21-May-2005
10   * Time: 18:52:06
11   * To change this template use File | Settings | File Templates.
12   */
13  public class SRand extends Stub {
14      private RandomState state;
15  
16      public SRand(RandomState state) {
17          this.state = state;
18      }
19  
20      public void executeStub(Environment environment) {
21          state.getRandom().setSeed(environment.getCpu().R[0]);
22      }
23  }