|         <!DOCTYPE html> | 
 |         <html> | 
 |         <head> | 
 |                 <meta charset="utf-8"> | 
 |         <title>Library VectorMath / Class mat2x4</title> | 
 |         <link rel="stylesheet" type="text/css" | 
 |             href="../styles.css" /> | 
 |         <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800" rel="stylesheet" type="text/css"> | 
 |         <link rel="shortcut icon" href="../favicon.ico" /> | 
 |         <script src="../client-static.js"></script> | 
 |          | 
 |         </head> | 
 |         <body data-library="VectorMath" data-type="mat2x4"> | 
 |         <div class="page"> | 
 |         <div class="header"> | 
 |           <a href="../index.html"><div class="logo"></div></a> | 
 |           <a href="../index.html">Dart Documentation</a> | 
 |          › <a href="../VectorMath.html">VectorMath</a> › <a href="../VectorMath/mat2x4.html">mat2x4</a></div> | 
 |         <div class="nav"> | 
 |          | 
 | <h2><div class="icon-library"></div><a href="../dart_core.html">dart:core</a></h2><h2><div class="icon-library"></div><a href="../dart_coreimpl.html">dart:coreimpl</a></h2><h2><div class="icon-library"></div><a href="../VectorMath.html">VectorMath</a></h2><ul class="icon"> | 
 | <li><a href="../VectorMath/vec2.html"><div class="icon-class"></div>vec2</a></li> | 
 | <li><a href="../VectorMath/vec3.html"><div class="icon-class"></div>vec3</a></li> | 
 | <li><a href="../VectorMath/vec4.html"><div class="icon-class"></div>vec4</a></li> | 
 | <li><a href="../VectorMath/mat2x2.html"><div class="icon-class"></div>mat2x2</a></li> | 
 | <li><a href="../VectorMath/mat2x3.html"><div class="icon-class"></div>mat2x3</a></li> | 
 | <li><div class="icon-class"></div><strong>mat2x4</strong></li> | 
 | <li><a href="../VectorMath/mat3x2.html"><div class="icon-class"></div>mat3x2</a></li> | 
 | <li><a href="../VectorMath/mat3x3.html"><div class="icon-class"></div>mat3x3</a></li> | 
 | <li><a href="../VectorMath/mat3x4.html"><div class="icon-class"></div>mat3x4</a></li> | 
 | <li><a href="../VectorMath/mat4x2.html"><div class="icon-class"></div>mat4x2</a></li> | 
 | <li><a href="../VectorMath/mat4x3.html"><div class="icon-class"></div>mat4x3</a></li> | 
 | <li><a href="../VectorMath/mat4x4.html"><div class="icon-class"></div>mat4x4</a></li> | 
 | <li><a href="../VectorMath/quat.html"><div class="icon-class"></div>quat</a></li> | 
 | </ul> | 
 | </div> | 
 | <div class="content"> | 
 |         <h2>Class | 
 |             <strong>mat2x4</strong></h2> | 
 |          | 
 | <div class="doc"> | 
 | <p>mat2x4 is a column major matrix where each column is represented by <a class="crossref" href="../VectorMath/vec4.html">vec4</a>. This matrix has 2 columns and 4 rows.</p> | 
 | </div> | 
 | <h3>Constructors</h3> | 
 | <div class="method"><h4 id="mat2x4"> | 
 | <span class="show-code">Code</span> | 
 | new <strong>mat2x4</strong>([arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7]) <a class="anchor-link" href="#mat2x4" | 
 |               title="Permalink to mat2x4.mat2x4">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Constructs a new mat2x4. Supports GLSL like syntax so many possible inputs. Defaults to identity matrix.</p> | 
 | <pre class="source"> | 
 | mat2x4([Dynamic arg0, Dynamic arg1, Dynamic arg2, Dynamic arg3, Dynamic arg4, Dynamic arg5, Dynamic arg6, Dynamic arg7]) { | 
 |   //Initialize the matrix as the identity matrix | 
 |   col0 = new vec4(); | 
 |   col1 = new vec4(); | 
 |   col0[0] = 1.0; | 
 |   col1[1] = 1.0; | 
 |   if (arg0 is num && arg1 is num && arg2 is num && arg3 is num && arg4 is num && arg5 is num && arg6 is num && arg7 is num) { | 
 |     col0[0] = arg0; | 
 |     col0[1] = arg1; | 
 |     col0[2] = arg2; | 
 |     col0[3] = arg3; | 
 |     col1[0] = arg4; | 
 |     col1[1] = arg5; | 
 |     col1[2] = arg6; | 
 |     col1[3] = arg7; | 
 |     return; | 
 |   } | 
 |   if (arg0 is num && arg1 == null && arg2 == null && arg3 == null && arg4 == null && arg5 == null && arg6 == null && arg7 == null) { | 
 |     col0[0] = arg0; | 
 |     col1[1] = arg0; | 
 |     return; | 
 |   } | 
 |   if (arg0 is vec2 && arg1 is vec2) { | 
 |     col0 = arg0; | 
 |     col1 = arg1; | 
 |     return; | 
 |   } | 
 |   if (arg0 is mat2x4) { | 
 |     col0 = arg0.col0; | 
 |     col1 = arg0.col1; | 
 |     return; | 
 |   } | 
 |   if (arg0 is mat2x3) { | 
 |     col0[0] = arg0.col0[0]; | 
 |     col0[1] = arg0.col0[1]; | 
 |     col0[2] = arg0.col0[2]; | 
 |     col1[0] = arg0.col1[0]; | 
 |     col1[1] = arg0.col1[1]; | 
 |     col1[2] = arg0.col1[2]; | 
 |     return; | 
 |   } | 
 |   if (arg0 is mat2x2) { | 
 |     col0[0] = arg0.col0[0]; | 
 |     col0[1] = arg0.col0[1]; | 
 |     col1[0] = arg0.col1[0]; | 
 |     col1[1] = arg0.col1[1]; | 
 |     return; | 
 |   } | 
 |   if (arg0 is vec2 && arg1 == null && arg2 == null && arg3 == null && arg4 == null && arg5 == null && arg6 == null && arg7 == null) { | 
 |     col0[0] = arg0[0]; | 
 |     col1[1] = arg0[1]; | 
 |   } | 
 | } | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="mat2x4"> | 
 | <span class="show-code">Code</span> | 
 | new <strong>mat2x4</strong>.outer(<a href="../VectorMath/vec2.html">vec2</a> u, <a href="../VectorMath/vec4.html">vec4</a> v) <a class="anchor-link" href="#mat2x4" | 
 |               title="Permalink to mat2x4.mat2x4">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Constructs a new mat2x4 from computing the outer product of  | 
 | <span class="param">u</span> and  | 
 | <span class="param">v</span>.</p> | 
 | <pre class="source"> | 
 | mat2x4.outer(vec2 u, vec4 v) { | 
 |   col0[0] = u[0] * v[0]; | 
 |   col0[1] = u[0] * v[1]; | 
 |   col0[2] = u[0] * v[2]; | 
 |   col0[3] = u[0] * v[3]; | 
 |   col1[0] = u[1] * v[0]; | 
 |   col1[1] = u[1] * v[1]; | 
 |   col1[2] = u[1] * v[2]; | 
 |   col1[3] = u[1] * v[3]; | 
 | } | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="mat2x4"> | 
 | <span class="show-code">Code</span> | 
 | new <strong>mat2x4</strong>.zero() <a class="anchor-link" href="#mat2x4" | 
 |               title="Permalink to mat2x4.mat2x4">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Constructs a new mat2x4 filled with zeros.</p> | 
 | <pre class="source"> | 
 | mat2x4.zero() { | 
 |   col0[0] = 0.0; | 
 |   col0[1] = 0.0; | 
 |   col0[2] = 0.0; | 
 |   col0[3] = 0.0; | 
 |   col1[0] = 0.0; | 
 |   col1[1] = 0.0; | 
 |   col1[2] = 0.0; | 
 |   col1[3] = 0.0; | 
 | } | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <h3>Methods</h3> | 
 | <div class="method"><h4 id="toString"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../dart_core/String.html">String</a> <strong>toString</strong>() <a class="anchor-link" href="#toString" | 
 |               title="Permalink to mat2x4.toString">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Returns a printable string</p> | 
 | <pre class="source"> | 
 | String toString() { | 
 |   String s = ''; | 
 |   s += '[0] ${getRow(0)}\n'; | 
 |   s += '[1] ${getRow(1)}\n'; | 
 |   s += '[2] ${getRow(2)}\n'; | 
 |   s += '[3] ${getRow(3)}\n'; | 
 |   return s; | 
 | } | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="get:rows"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../dart_core/num.html">num</a> <strong>get rows</strong>() <a class="anchor-link" href="#get:rows" | 
 |               title="Permalink to mat2x4.get rows">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Returns the number of rows in the matrix.</p> | 
 | <pre class="source"> | 
 | num get rows() => 4; | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="get:cols"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../dart_core/num.html">num</a> <strong>get cols</strong>() <a class="anchor-link" href="#get:cols" | 
 |               title="Permalink to mat2x4.get cols">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Returns the number of columns in the matrix.</p> | 
 | <pre class="source"> | 
 | num get cols() => 2; | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="get:length"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../dart_core/num.html">num</a> <strong>get length</strong>() <a class="anchor-link" href="#get:length" | 
 |               title="Permalink to mat2x4.get length">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Returns the number of columns in the matrix.</p> | 
 | <pre class="source"> | 
 | num get length() => 2; | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id=":index"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../VectorMath/vec4.html">vec4</a> <strong>operator []</strong>(<a href="../dart_core/int.html">int</a> column) <a class="anchor-link" href="#:index" | 
 |               title="Permalink to mat2x4.operator []">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Gets the  | 
 | <span class="param">column</span> of the matrix</p> | 
 | <pre class="source"> | 
 | vec4 operator[](int column) { | 
 |   assert(column >= 0 && column < 2); | 
 |   switch (column) { | 
 |     case 0: return col0; break; | 
 |     case 1: return col1; break; | 
 |   } | 
 |   throw new IllegalArgumentException(column); | 
 | } | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id=":setindex"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../VectorMath/vec4.html">vec4</a> <strong>operator []=</strong>(<a href="../dart_core/int.html">int</a> column, <a href="../VectorMath/vec4.html">vec4</a> arg) <a class="anchor-link" href="#:setindex" | 
 |               title="Permalink to mat2x4.operator []=">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Assigns the  | 
 | <span class="param">column</span> of the matrix  | 
 | <span class="param">arg</span></p> | 
 | <pre class="source"> | 
 | vec4 operator[]=(int column, vec4 arg) { | 
 |   assert(column >= 0 && column < 2); | 
 |   switch (column) { | 
 |     case 0: col0 = arg; return col0; break; | 
 |     case 1: col1 = arg; return col1; break; | 
 |   } | 
 |   throw new IllegalArgumentException(column); | 
 | } | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="get:row0"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../VectorMath/vec2.html">vec2</a> <strong>get row0</strong>() <a class="anchor-link" href="#get:row0" | 
 |               title="Permalink to mat2x4.get row0">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Returns row 0</p> | 
 | <pre class="source"> | 
 | vec2 get row0() => getRow(0); | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="set:row0"> | 
 | <span class="show-code">Code</span> | 
 | <strong>set row0</strong>(<a href="../VectorMath/vec2.html">vec2</a> arg) <a class="anchor-link" href="#set:row0" | 
 |               title="Permalink to mat2x4.set row0">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Sets row 0 to  | 
 | <span class="param">arg</span></p> | 
 | <pre class="source"> | 
 | set row0(vec2 arg) => setRow(0, arg); | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="get:row1"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../VectorMath/vec2.html">vec2</a> <strong>get row1</strong>() <a class="anchor-link" href="#get:row1" | 
 |               title="Permalink to mat2x4.get row1">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Returns row 1</p> | 
 | <pre class="source"> | 
 | vec2 get row1() => getRow(1); | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="set:row1"> | 
 | <span class="show-code">Code</span> | 
 | <strong>set row1</strong>(<a href="../VectorMath/vec2.html">vec2</a> arg) <a class="anchor-link" href="#set:row1" | 
 |               title="Permalink to mat2x4.set row1">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Sets row 1 to  | 
 | <span class="param">arg</span></p> | 
 | <pre class="source"> | 
 | set row1(vec2 arg) => setRow(1, arg); | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="get:row2"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../VectorMath/vec2.html">vec2</a> <strong>get row2</strong>() <a class="anchor-link" href="#get:row2" | 
 |               title="Permalink to mat2x4.get row2">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Returns row 2</p> | 
 | <pre class="source"> | 
 | vec2 get row2() => getRow(2); | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="set:row2"> | 
 | <span class="show-code">Code</span> | 
 | <strong>set row2</strong>(<a href="../VectorMath/vec2.html">vec2</a> arg) <a class="anchor-link" href="#set:row2" | 
 |               title="Permalink to mat2x4.set row2">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Sets row 2 to  | 
 | <span class="param">arg</span></p> | 
 | <pre class="source"> | 
 | set row2(vec2 arg) => setRow(2, arg); | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="get:row3"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../VectorMath/vec2.html">vec2</a> <strong>get row3</strong>() <a class="anchor-link" href="#get:row3" | 
 |               title="Permalink to mat2x4.get row3">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Returns row 3</p> | 
 | <pre class="source"> | 
 | vec2 get row3() => getRow(3); | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="set:row3"> | 
 | <span class="show-code">Code</span> | 
 | <strong>set row3</strong>(<a href="../VectorMath/vec2.html">vec2</a> arg) <a class="anchor-link" href="#set:row3" | 
 |               title="Permalink to mat2x4.set row3">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Sets row 3 to  | 
 | <span class="param">arg</span></p> | 
 | <pre class="source"> | 
 | set row3(vec2 arg) => setRow(3, arg); | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="setRow"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../dart_core/void.html">void</a> <strong>setRow</strong>(<a href="../dart_core/int.html">int</a> row, <a href="../VectorMath/vec2.html">vec2</a> arg) <a class="anchor-link" href="#setRow" | 
 |               title="Permalink to mat2x4.setRow">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Assigns the <code>column</code> of the matrix  | 
 | <span class="param">arg</span></p> | 
 | <pre class="source"> | 
 | void setRow(int row, vec2 arg) { | 
 |   assert(row >= 0 && row < 4); | 
 |   this[0][row] = arg[0]; | 
 |   this[1][row] = arg[1]; | 
 | } | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="getRow"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../VectorMath/vec2.html">vec2</a> <strong>getRow</strong>(<a href="../dart_core/int.html">int</a> row) <a class="anchor-link" href="#getRow" | 
 |               title="Permalink to mat2x4.getRow">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Gets the  | 
 | <span class="param">row</span> of the matrix</p> | 
 | <pre class="source"> | 
 | vec2 getRow(int row) { | 
 |   assert(row >= 0 && row < 4); | 
 |   vec2 r = new vec2(); | 
 |   r[0] = this[0][row]; | 
 |   r[1] = this[1][row]; | 
 |   return r; | 
 | } | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="setColumn"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../dart_core/void.html">void</a> <strong>setColumn</strong>(<a href="../dart_core/int.html">int</a> column, <a href="../VectorMath/vec4.html">vec4</a> arg) <a class="anchor-link" href="#setColumn" | 
 |               title="Permalink to mat2x4.setColumn">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Assigns the  | 
 | <span class="param">column</span> of the matrix  | 
 | <span class="param">arg</span></p> | 
 | <pre class="source"> | 
 | void setColumn(int column, vec4 arg) { | 
 |   assert(column >= 0 && column < 2); | 
 |   this[column] = arg; | 
 | } | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="getColumn"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../VectorMath/vec4.html">vec4</a> <strong>getColumn</strong>(<a href="../dart_core/int.html">int</a> column) <a class="anchor-link" href="#getColumn" | 
 |               title="Permalink to mat2x4.getColumn">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Gets the  | 
 | <span class="param">column</span> of the matrix</p> | 
 | <pre class="source"> | 
 | vec4 getColumn(int column) { | 
 |   assert(column >= 0 && column < 2); | 
 |   return new vec4(this[column]); | 
 | } | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id=":mul"> | 
 | <span class="show-code">Code</span> | 
 | <strong>operator *</strong>(arg) <a class="anchor-link" href="#:mul" | 
 |               title="Permalink to mat2x4.operator *">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Returns a new vector or matrix by multiplying <code>this</code> with  | 
 | <span class="param">arg</span>.</p> | 
 | <pre class="source"> | 
 | Dynamic operator*(Dynamic arg) { | 
 |   if (arg is num) { | 
 |     mat2x4 r = new mat2x4(); | 
 |     r[0][0] = this[0][0] * arg; | 
 |     r[0][1] = this[0][1] * arg; | 
 |     r[0][2] = this[0][2] * arg; | 
 |     r[0][3] = this[0][3] * arg; | 
 |     r[1][0] = this[1][0] * arg; | 
 |     r[1][1] = this[1][1] * arg; | 
 |     r[1][2] = this[1][2] * arg; | 
 |     r[1][3] = this[1][3] * arg; | 
 |     return r; | 
 |   } | 
 |   if (arg is vec2) { | 
 |     vec4 r = new vec4(); | 
 |     r[0] = dot(row0, arg); | 
 |     r[1] = dot(row1, arg); | 
 |     r[2] = dot(row2, arg); | 
 |     r[3] = dot(row3, arg); | 
 |     return r; | 
 |   } | 
 |   if (4 == arg.cols) { | 
 |     Dynamic r = null; | 
 |     if (arg.rows == 2) { | 
 |       r = new mat2x2(); | 
 |     } | 
 |     if (arg.rows == 3) { | 
 |       r = new mat2x3(); | 
 |     } | 
 |     if (arg.rows == 4) { | 
 |       r = new mat2x4(); | 
 |     } | 
 |     for (int j = 0; j < arg.rows; j++) { | 
 |       r[0][j] = dot(this.getRow(0), arg.getColumn(j)); | 
 |     } | 
 |     for (int j = 0; j < arg.rows; j++) { | 
 |       r[1][j] = dot(this.getRow(1), arg.getColumn(j)); | 
 |     } | 
 |     return r; | 
 |   } | 
 |   throw new IllegalArgumentException(arg); | 
 | } | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id=":add"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../VectorMath/mat2x4.html">mat2x4</a> <strong>operator +</strong>(<a href="../VectorMath/mat2x4.html">mat2x4</a> arg) <a class="anchor-link" href="#:add" | 
 |               title="Permalink to mat2x4.operator +">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Returns new matrix after component wise <code>this</code> +  | 
 | <span class="param">arg</span></p> | 
 | <pre class="source"> | 
 | mat2x4 operator+(mat2x4 arg) { | 
 |   mat2x4 r = new mat2x4(); | 
 |   r[0][0] = this[0][0] + arg[0][0]; | 
 |   r[0][1] = this[0][1] + arg[0][1]; | 
 |   r[0][2] = this[0][2] + arg[0][2]; | 
 |   r[0][3] = this[0][3] + arg[0][3]; | 
 |   r[1][0] = this[1][0] + arg[1][0]; | 
 |   r[1][1] = this[1][1] + arg[1][1]; | 
 |   r[1][2] = this[1][2] + arg[1][2]; | 
 |   r[1][3] = this[1][3] + arg[1][3]; | 
 |   return r; | 
 | } | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id=":sub"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../VectorMath/mat2x4.html">mat2x4</a> <strong>operator -</strong>(<a href="../VectorMath/mat2x4.html">mat2x4</a> arg) <a class="anchor-link" href="#:sub" | 
 |               title="Permalink to mat2x4.operator -">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Returns new matrix after component wise <code>this</code> -  | 
 | <span class="param">arg</span></p> | 
 | <pre class="source"> | 
 | mat2x4 operator-(mat2x4 arg) { | 
 |   mat2x4 r = new mat2x4(); | 
 |   r[0][0] = this[0][0] - arg[0][0]; | 
 |   r[0][1] = this[0][1] - arg[0][1]; | 
 |   r[0][2] = this[0][2] - arg[0][2]; | 
 |   r[0][3] = this[0][3] - arg[0][3]; | 
 |   r[1][0] = this[1][0] - arg[1][0]; | 
 |   r[1][1] = this[1][1] - arg[1][1]; | 
 |   r[1][2] = this[1][2] - arg[1][2]; | 
 |   r[1][3] = this[1][3] - arg[1][3]; | 
 |   return r; | 
 | } | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id=":negate"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../VectorMath/mat2x4.html">mat2x4</a> <strong>operator negate</strong>() <a class="anchor-link" href="#:negate" | 
 |               title="Permalink to mat2x4.operator negate">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Returns new matrix -this</p> | 
 | <pre class="source"> | 
 | mat2x4 operator negate() { | 
 |   mat2x4 r = new mat2x4(); | 
 |   r[0] = -this[0]; | 
 |   r[1] = -this[1]; | 
 |   return r; | 
 | } | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="transposed"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../VectorMath/mat4x2.html">mat4x2</a> <strong>transposed</strong>() <a class="anchor-link" href="#transposed" | 
 |               title="Permalink to mat2x4.transposed">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Returns the tranpose of this.</p> | 
 | <pre class="source"> | 
 | mat4x2 transposed() { | 
 |   mat4x2 r = new mat4x2(); | 
 |   r[0][0] = this[0][0]; | 
 |   r[1][0] = this[0][1]; | 
 |   r[0][1] = this[1][0]; | 
 |   r[1][1] = this[1][1]; | 
 |   r[0][2] = this[2][0]; | 
 |   r[1][2] = this[2][1]; | 
 |   r[0][3] = this[3][0]; | 
 |   r[1][3] = this[3][1]; | 
 |   return r; | 
 | } | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="absolute"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../VectorMath/mat2x4.html">mat2x4</a> <strong>absolute</strong>() <a class="anchor-link" href="#absolute" | 
 |               title="Permalink to mat2x4.absolute">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Returns the component wise absolute value of this.</p> | 
 | <pre class="source"> | 
 | mat2x4 absolute() { | 
 |   mat2x4 r = new mat2x4(); | 
 |   r[0][0] = this[0][0].abs(); | 
 |   r[0][1] = this[0][1].abs(); | 
 |   r[0][2] = this[0][2].abs(); | 
 |   r[0][3] = this[0][3].abs(); | 
 |   r[1][0] = this[1][0].abs(); | 
 |   r[1][1] = this[1][1].abs(); | 
 |   r[1][2] = this[1][2].abs(); | 
 |   r[1][3] = this[1][3].abs(); | 
 |   return r; | 
 | } | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="infinityNorm"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../dart_core/num.html">num</a> <strong>infinityNorm</strong>() <a class="anchor-link" href="#infinityNorm" | 
 |               title="Permalink to mat2x4.infinityNorm">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Returns infinity norm of the matrix. Used for numerical analysis.</p> | 
 | <pre class="source"> | 
 | num infinityNorm() { | 
 |   num norm = 0.0; | 
 |   { | 
 |     num row_norm = 0.0; | 
 |     row_norm += this[0][0].abs(); | 
 |     row_norm += this[0][1].abs(); | 
 |     row_norm += this[0][2].abs(); | 
 |     row_norm += this[0][3].abs(); | 
 |     norm = row_norm > norm ? row_norm : norm; | 
 |   } | 
 |   { | 
 |     num row_norm = 0.0; | 
 |     row_norm += this[1][0].abs(); | 
 |     row_norm += this[1][1].abs(); | 
 |     row_norm += this[1][2].abs(); | 
 |     row_norm += this[1][3].abs(); | 
 |     norm = row_norm > norm ? row_norm : norm; | 
 |   } | 
 |   return norm; | 
 | } | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="relativeError"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../dart_core/num.html">num</a> <strong>relativeError</strong>(<a href="../VectorMath/mat2x4.html">mat2x4</a> correct) <a class="anchor-link" href="#relativeError" | 
 |               title="Permalink to mat2x4.relativeError">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Returns relative error between <code>this</code> and  | 
 | <span class="param">correct</span></p> | 
 | <pre class="source"> | 
 | num relativeError(mat2x4 correct) { | 
 |   num this_norm = infinityNorm(); | 
 |   num correct_norm = correct.infinityNorm(); | 
 |   num diff_norm = (this_norm - correct_norm).abs(); | 
 |   return diff_norm/correct_norm; | 
 | } | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="method"><h4 id="absoluteError"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../dart_core/num.html">num</a> <strong>absoluteError</strong>(<a href="../VectorMath/mat2x4.html">mat2x4</a> correct) <a class="anchor-link" href="#absoluteError" | 
 |               title="Permalink to mat2x4.absoluteError">#</a></h4> | 
 | <div class="doc"> | 
 | <p>Returns absolute error between <code>this</code> and  | 
 | <span class="param">correct</span></p> | 
 | <pre class="source"> | 
 | num absoluteError(mat2x4 correct) { | 
 |   num this_norm = infinityNorm(); | 
 |   num correct_norm = correct.infinityNorm(); | 
 |   num diff_norm = (this_norm - correct_norm).abs(); | 
 |   return diff_norm; | 
 | } | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <h3>Fields</h3> | 
 | <div class="field"><h4 id="col0"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../VectorMath/vec4.html">vec4</a>         <strong>col0</strong> <a class="anchor-link" | 
 |             href="#col0" | 
 |             title="Permalink to mat2x4.col0">#</a> | 
 |         </h4> | 
 |         <div class="doc"> | 
 |  | 
 | <pre class="source"> | 
 | vec4 col0; | 
 | </pre> | 
 | </div> | 
 | </div> | 
 | <div class="field"><h4 id="col1"> | 
 | <span class="show-code">Code</span> | 
 | <a href="../VectorMath/vec4.html">vec4</a>         <strong>col1</strong> <a class="anchor-link" | 
 |             href="#col1" | 
 |             title="Permalink to mat2x4.col1">#</a> | 
 |         </h4> | 
 |         <div class="doc"> | 
 |  | 
 | <pre class="source"> | 
 | vec4 col1; | 
 | </pre> | 
 | </div> | 
 | </div> | 
 |         </div> | 
 |         <div class="clear"></div> | 
 |         </div> | 
 |         <div class="footer"></div> | 
 |         </body></html> | 
 |          |