Difference between pages "ReturnNVectorCOG" and "ReturnRandomVector"
From scripting
(Difference between pages)
(Created page with " global proc vector ReturnNVectorCOG(vector $AllVecs[]) { //Author Nick Pisca 0001d 2010 //$AllVecs[0]=<<0,0,0>>;$AllVecs[1]=<<1,-1,0>>;$AllVecs[2]=<<1,0,0>>;$AllVecs[3]=<...") |
(Created page with " global proc vector returnRandomVector(float $Lower, float $Higher) { //Author Nick Pisca 0001d 2009 float $XVal = rand($Lower, $Higher); float $YVal = rand($Lower, $Higher...") |
||
Line 1: | Line 1: | ||
− | global proc vector | + | global proc vector returnRandomVector(float $Lower, float $Higher) { |
− | + | //Author Nick Pisca 0001d 2009 | |
− | + | float $XVal = rand($Lower, $Higher); | |
− | + | float $YVal = rand($Lower, $Higher); | |
− | + | float $ZVal = rand($Lower, $Higher); | |
− | + | vector $CAPVec = <<$XVal, $YVal, $ZVal>>; | |
− | + | return $CAPVec; | |
− | |||
− | |||
− | |||
− | |||
} | } | ||
− | + | ''More information on vectors and vector mathematics, read pages 14-16, 20-21 in [http://stores.lulu.com/nickpisca YSYT]. | |
− | |||
− | ''More information on vectors and vector mathematics, read pages 14-16, 20-21 in [http://stores.lulu.com/nickpisca YSYT]. | ||
[[Category:MEL]] | [[Category:MEL]] |
Latest revision as of 19:56, 24 April 2017
global proc vector returnRandomVector(float $Lower, float $Higher) { //Author Nick Pisca 0001d 2009 float $XVal = rand($Lower, $Higher); float $YVal = rand($Lower, $Higher); float $ZVal = rand($Lower, $Higher); vector $CAPVec = <<$XVal, $YVal, $ZVal>>; return $CAPVec; }
More information on vectors and vector mathematics, read pages 14-16, 20-21 in YSYT.