# OffMidVector

From scripting

global proc vector OffMidVector(vector $v1, vector $v2, float $RandRange) { //Author Nick Pisca 0001d 2008 vector $MidVec = <<((($v1.x)+($v2.x))/2),((($v1.y)+($v2.y))/2),((($v1.z)+($v2.z))/2)>>; float $XRange = rand(-$RandRange,$RandRange); float $YRange = rand(-$RandRange,$RandRange); float $ZRange = rand(-$RandRange,$RandRange); vector $RandVec = <<$XRange,$YRange,$ZRange>>; return ($MidVec-$RandVec); }

*More information on vectors and vector mathematics, read pages 14-16, 20-21 in YSYT.*