Difference between revisions of "FixUnboundedVector MEL"

From scripting
Jump to: navigation, search
(Created page with " global proc vector FixUnboundedVector(vector $TV2) { //0001D LLC 2015 Nick Pisca if (($TV2.x) > 1.0) { $TV2 = <<0.999, ($TV2.y), 0.0>>; } if (($TV2.y) > 1.0) {...")
 
(No difference)

Latest revision as of 05:34, 22 April 2017

global proc vector FixUnboundedVector(vector $TV2) {
	//0001D LLC 2015 Nick Pisca
		if (($TV2.x) > 1.0) {
			$TV2 = <<0.999, ($TV2.y), 0.0>>;
		}
		if (($TV2.y) > 1.0) {
			$TV2 = <<($TV2.x), 0.999, 0.0>>;
		}
		if (($TV2.x) < 0.0) {
			$TV2 = <<0.001, ($TV2.y), 0.0>>;
		}
		if (($TV2.y) < 0.0) {
			$TV2 = <<($TV2.x), 0.999, 0.0>>;
		}
	return $TV2;
}


More information on vectors and arrays, read pages 12-16 in YSYT.