Changeset 248 for trunk/thune/doc

Show
Ignore:
Timestamp:
08/11/06 16:12:18 (2 years ago)
Author:
krobillard
Message:

Thune - Added 'random.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/doc/UserManual

    r236 r248  
    7575block!       []  [a b c] 
    7676paren!       ()  (a b c) 
     77array!       #[1 2 3] 
    7778function!    [2 add] proc :inc2 
    7879call!        
     
    8081decimal!     3.05  -4. 
    8182coord!       0,255,100  -1, 0, 0  
     83vec3!        0.0,255.0,100.0  -1.0, 0, 0  
    8284char!        'a' '^-' 
    8385string!      "hello"  {hello} 
     
    120122 
    121123 
     124Array 
     125----- 
     126 
     127Arrays hold a series of 32-bit numbers using less memory than a block!. 
     128 
     129All numbers in an array are either integers or floating point values.  If 
     130any number is specified as a decimal!, all numbers will be floating point. 
     131 
     132 
    122133Coord 
    123134----- 
     
    133144   255,10,0      ; rgb triplet 
    134145   192,168,0,1   ; IP-4 network address 
     146 
     147 
     148Vec3 
     149---- 
     150 
     151Vec3 stores 3 floating point values. 
    135152 
    136153 
     
    388405arctan       (n -- r)           Arctangent 
    389406sqrt         (n -- r)           Square root 
     407random       (max -- n)         Generate random number. 
     408random       (n 'seed -- )      Seed random number generator. 
    390409===========  =================  ================= 
     410 
     411 
     412Vector Math 
     413~~~~~~~~~~~ 
     414 
     415These functions operate on vec3!/coord!. 
     416 
     417===========  ======================  ====================== 
     418Word         Stack Usage             Function 
     419===========  ======================  ====================== 
     420dot          (v1 v2 -- dot)          Vector dot product. 
     421cross        (v1 v2 -- cross)        Vector cross product. 
     422normalize    (vec -- vec)            Make vec3 unit length. 
     423===========  ======================  ====================== 
    391424 
    392425