To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 990
989  |  991
Subject: 
uploaded some scripts to my website
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Mon, 26 Feb 2001 02:39:33 GMT
Viewed: 
1950 times
  
I've just uploaded the following scripts to
http://rikblok.cjb.net/nqc/index.html. I hope they're useful to
somebody.  If you have any suggestions, let me know.

Thanks, Rik

bitshift.nqh
    Current versions of NQC (v2.3-) do not support bitshifting with
    variable operands, so the following two functions are defined to
    do the job:
    bitshiftLeft(in, bits, out); // out = in << bits
    bitshiftRight(in, bits, out); // out = in >> bits

motorP.nqh
    Redefines the output functions so they support priorities. This is
    an unsophisticated solution to the problem of controlling outputs
    in a multitasking environment. I've seen better solutions but this
    has the advantage of being conceptually simple.

randG.nqh
    A (slow) genuine random number generator. The built-in function
    Random() is unsuitable for multiple bots because it always begins
    with the same seed so each bot generates the same sequence of
    random numbers.

randP.nqh
    A (fast) pseudo-random number generator with a genuine random
    seed. The built-in function Random() is unsuitable for multiple bots
    because it always begins with the same seed so each bot
    generates the same sequence of random numbers.


--
Rik Blok  <RikBlok@mail.com>
Centre for Applied Ethics,
University of British Columbia, Canada
http://RikBlok.cjb.net



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR