:: cross-product ( a b -- vec ) a 31matrix? b 31matrix? and not [ a b not-31matrix ] [ { [ { 1 0 0 } a b 3append det ] [ { 0 1 0 } a b 3append det ] [ { 0 0 1 } a b 3append det ] } [ call( -- x ) ] map ] if ; :: cross-product ( a b -- vec ) a 31matrix? b 31matrix? and not [ a b not-31matrix ] [ [ { 1 0 0 } a b 3append det { 0 1 0 } a b 3append det { 0 0 1 } a b 3append det ] output>array ] if ; :: cross-product ( a b -- vec ) a 31matrix? b 31matrix? and not [ a b not-31matrix ] [ { 1 0 0 } a b 3append det { 0 1 0 } a b 3append det { 0 0 1 } a b 3append det 3array ] if ; :: cross-product ( a b -- vec ) a 31matrix? b 31matrix? and not [ a b not-31matrix ] [ { { 1 0 0 } { 0 1 0 } { 0 0 1 } } [ a b 3append det ] map ] if ;