Difference between revisions of "ReturnCOG"

From scripting
Jump to: navigation, search
(Created page with " global proc vector ReturnCOG(vector $V1, vector $V2, vector $V3) { //Author Nick Pisca 0001d 2010 //$V1 = <<0,0,0>>; $V2 = <<1,-1,0>>; $V3 = <<1,0,0>> vector $TempVe...")
 
(No difference)

Latest revision as of 19:55, 24 April 2017

global proc vector ReturnCOG(vector $V1, vector $V2, vector $V3) {
 	//Author Nick Pisca 0001d 2010  
	//$V1 = <<0,0,0>>; $V2 = <<1,-1,0>>; $V3 = <<1,0,0>>
	vector $TempVec = ($V1 + $V2 + $V3)/3;
	return $TempVec;
}



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