diff options
Diffstat (limited to 'doc/sims/geometry/Vector2D.html')
-rw-r--r-- | doc/sims/geometry/Vector2D.html | 1047 |
1 files changed, 427 insertions, 620 deletions
diff --git a/doc/sims/geometry/Vector2D.html b/doc/sims/geometry/Vector2D.html index 816428e..990b144 100644 --- a/doc/sims/geometry/Vector2D.html +++ b/doc/sims/geometry/Vector2D.html @@ -1,628 +1,435 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> - <head><title>class Vector2D in sims.geometry</title> - <meta http-equiv="content-type" content="text/html; charset=UTF8"></meta><meta content="scaladoc (version 2.7.5.final)" name="generator"></meta><link href="../../style.css" type="text/css" rel="stylesheet"></link><script type="text/javascript" src="../../script.js"></script> - </head> - <body onload="init()"> - <table summary="" class="navigation"> - <tr> - <td class="navigation-links" valign="top"> - <!-- <table><tr></tr></table> --> - </td> - <td align="right" valign="top" style="white-space:nowrap;" rowspan="2"> - <div class="doctitle-larger">SiMS</div> - </td> - </tr> - <tr><td></td></tr> - </table> - - <div class="entity"> - <a href="../../sims/geometry$package.html" target="_self">sims.geometry</a> - <br></br> - <span class="entity">class Vector2D</span> - </div><hr></hr> - <div class="source"> - [source: <a href="" class="sims/geometry/Vector2D"><code>sims/geometry/Vector2D.scala</code></a>] - </div><hr></hr> - <a name="Vector2D"></a><dl> - <dt> - - <code>case</code> - <code>class</code> - <em>Vector2D</em>(<code>val </code><em>x</em> : <a href="http://www.scala-lang.org/docu/files/api/scala/Double.html" target="_self">Double</a>, <code>val </code><em>y</em> : <a href="http://www.scala-lang.org/docu/files/api/scala/Double.html" target="_self">Double</a>) - </dt> - <dd><code> extends </code><a href="" target="contentFrame" class="scala/Product">scala.Product</a></dd> - </dl> - <dl><dd>A 2D vector.</dd></dl> - <dl><dt style="margin:10px 0 0 20px;"> - <b>Parameters</b></dt><dd><code>x - </code>1st component</dd><dd><code>y - </code>2nd component</dd></dl> + <head> + <title>Scaladoc for sims.geometry.Vector2D</title> + <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> + <script type="text/javascript" src="../../lib/jquery.js"></script> + + <style type="text/css"> + @import url(../../lib/template.css) screen; + </style> + <script type="text/javascript" src="../../lib/template.js"></script> + </head> + <body class="type"> + <p id="owner"><a href="../package.html">sims</a>.<a href="package.html">geometry</a></p> -<table summary="" cellpadding="3" class="member"> - <tr><td class="title" colspan="2">Value Summary</td></tr> - <tr> - <td class="modifiers" valign="top"> - <code> val</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#length" target="_self">length</a></em> - : <a href="http://www.scala-lang.org/docu/files/api/scala/Double.html" target="_self">Double</a> - - <div>Norm or length of this vector.</div> - </td> - </tr> - </table> -<table summary="" cellpadding="3" class="member"> - <tr><td class="title" colspan="2">Method Summary</td></tr> - <tr> - <td class="modifiers" valign="top"> - <code> def</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#*%28Double%29" target="_self">*</a></em> - (<em>n</em> : <a href="http://www.scala-lang.org/docu/files/api/scala/Double.html" target="_self">Double</a>) : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a> - - <div>Scalar multiplication.</div> - </td> - </tr> -<tr> - <td class="modifiers" valign="top"> - <code> def</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#%2B%28sims.geometry.Vector2D%29" target="_self">+</a></em> - (<em>v</em> : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a>) : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a> - - <div>Vector addition.</div> - </td> - </tr> -<tr> - <td class="modifiers" valign="top"> - <code> def</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#-%28sims.geometry.Vector2D%29" target="_self">-</a></em> - (<em>v</em> : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a>) : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a> - - <div>Vector substraction.</div> - </td> - </tr> -<tr> - <td class="modifiers" valign="top"> - <code> def</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#%2F%28Double%29" target="_self">/</a></em> - (<em>n</em> : <a href="http://www.scala-lang.org/docu/files/api/scala/Double.html" target="_self">Double</a>) : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a> - - <div>Scalar division.</div> - </td> - </tr> -<tr> - <td class="modifiers" valign="top"> - <code> def</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#components" target="_self">components</a></em> - : <a href="" target="contentFrame" class="scala/List">scala.List</a>[<a href="http://www.scala-lang.org/docu/files/api/scala/Double.html" target="_self">Double</a>] - - <div>Returns a list of this vector's components.</div> - </td> - </tr> -<tr> - <td class="modifiers" valign="top"> - <code> def</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#cross%28sims.geometry.Vector2D%29" target="_self">cross</a></em> - (<em>v</em> : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a>) : <a href="http://www.scala-lang.org/docu/files/api/scala/Double.html" target="_self">Double</a> - - <div>Cross product. Length only because in 2D. The direction would be given by the x3-axis.</div> - </td> - </tr> -<tr> - <td class="modifiers" valign="top"> - <code> def</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#dot%28sims.geometry.Vector2D%29" target="_self">dot</a></em> - (<em>v</em> : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a>) : <a href="http://www.scala-lang.org/docu/files/api/scala/Double.html" target="_self">Double</a> - - <div>Dot product.</div> - </td> - </tr> -<tr> - <td class="modifiers" valign="top"> - <code>override def</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#equals%28Any%29" target="_self">equals</a></em> - (<em>arg0</em> : <a href="http://www.scala-lang.org/docu/files/api/scala/Any.html" target="_self">Any</a>) : <a href="http://www.scala-lang.org/docu/files/api/scala/Boolean.html" target="_self">Boolean</a> - - <div>This method is used to compare the receiver object (<code>this</code>)
- with the argument object (<code>arg0</code>) for equivalence.</div> - </td> - </tr> -<tr> - <td class="modifiers" valign="top"> - <code>override def</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#hashCode%28%29" target="_self">hashCode</a></em> - : <a href="http://www.scala-lang.org/docu/files/api/scala/Int.html" target="_self">Int</a> - - <div>Returns a hash code value for the object.</div> - </td> - </tr> -<tr> - <td class="modifiers" valign="top"> - <code> def</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#isNull" target="_self">isNull</a></em> - : <a href="http://www.scala-lang.org/docu/files/api/scala/Boolean.html" target="_self">Boolean</a> - - <div>Checks if this vector is the null vector.</div> - </td> - </tr> -<tr> - <td class="modifiers" valign="top"> - <code> def</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#leftNormal" target="_self">leftNormal</a></em> - : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a> - - <div>Left normal vector. (-y, x)</div> - </td> - </tr> -<tr> - <td class="modifiers" valign="top"> - <code>override def</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#productArity" target="_self">productArity</a></em> - : <a href="http://www.scala-lang.org/docu/files/api/scala/Int.html" target="_self">Int</a> - - - </td> - </tr> -<tr> - <td class="modifiers" valign="top"> - <code>override def</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#productElement%28Int%29" target="_self">productElement</a></em> - (<em>arg0</em> : <a href="http://www.scala-lang.org/docu/files/api/scala/Int.html" target="_self">Int</a>) : <a href="http://www.scala-lang.org/docu/files/api/scala/Any.html" target="_self">Any</a> - - - </td> - </tr> -<tr> - <td class="modifiers" valign="top"> - <code>override def</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#productPrefix" target="_self">productPrefix</a></em> - : <a href="" target="contentFrame" class="java/lang/String">java.lang.String</a> - - - </td> - </tr> -<tr> - <td class="modifiers" valign="top"> - <code> def</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#project%28sims.geometry.Vector2D%29" target="_self">project</a></em> - (<em>v</em> : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a>) : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a> - - <div>Returns the projection of this vector onto the vector <code>v</code>.</div> - </td> - </tr> -<tr> - <td class="modifiers" valign="top"> - <code> def</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#rightNormal" target="_self">rightNormal</a></em> - : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a> - - <div>Right normal vector. (y, -x)</div> - </td> - </tr> -<tr> - <td class="modifiers" valign="top"> - <code> def</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#rotate%28Double%29" target="_self">rotate</a></em> - (<em>angle</em> : <a href="http://www.scala-lang.org/docu/files/api/scala/Double.html" target="_self">Double</a>) : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a> - - <div>Returns a rotation of this vector by <code>angle</code> radian.</div> - </td> - </tr> -<tr> - <td class="modifiers" valign="top"> - <code>override def</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#toString%28%29" target="_self">toString</a></em> - : <a href="" target="contentFrame" class="java/lang/String">java.lang.String</a> - - <div>Returns a string representation of the object.</div> - </td> - </tr> -<tr> - <td class="modifiers" valign="top"> - <code> def</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#unary_-" target="_self">unary_-</a></em> - : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a> - - <div>Unary minus.</div> - </td> - </tr> -<tr> - <td class="modifiers" valign="top"> - <code> def</code> - </td> - <td class="signature"> - <em><a href="../../sims/geometry/Vector2D.html#unit" target="_self">unit</a></em> - : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a> - - <div>Unit vector.</div> - </td> - </tr> - </table><table summary="" cellpadding="3" class="inherited"> - <tr><td class="title" colspan="2"> - Methods inherited from <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html" target="_self">AnyRef</a> - </td></tr> - <tr><td class="signature" colspan="2"> - <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#getClass%28%29" target="_self">getClass</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#clone%28%29" target="_self">clone</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#notify%28%29" target="_self">notify</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#notifyAll%28%29" target="_self">notifyAll</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#wait%28Long%29" target="_self">wait</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#wait%28Long%2CInt%29" target="_self">wait</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#wait%28%29" target="_self">wait</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#finalize%28%29" target="_self">finalize</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#%3D%3D%28AnyRef%29" target="_self">==</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#%21%3D%28AnyRef%29" target="_self">!=</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#eq%28AnyRef%29" target="_self">eq</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#ne%28AnyRef%29" target="_self">ne</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#synchronized%28T0%29" target="_self">synchronized</a> - </td></tr> - </table><table summary="" cellpadding="3" class="inherited"> - <tr><td class="title" colspan="2"> - Methods inherited from <a href="http://www.scala-lang.org/docu/files/api/scala/Any.html" target="_self">Any</a> - </td></tr> - <tr><td class="signature" colspan="2"> - <a href="http://www.scala-lang.org/docu/files/api/scala/Any.html#%3D%3D%28Any%29" target="_self">==</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/Any.html#%21%3D%28Any%29" target="_self">!=</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/Any.html#isInstanceOf" target="_self">isInstanceOf</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/Any.html#asInstanceOf" target="_self">asInstanceOf</a> - </td></tr> - </table> - + <div id="definition"> + <img src="../../lib/class_big.png" /> + <h1>Vector2D</h1> + </div> + <h4 class="signature"> + <span class="kind">class</span> + <span class="symbol"> + <span class="name">Vector2D</span><span class="params">(<span name="x">x: <span class="extype" name="scala.Double">Double</span></span>, <span name="y">y: <span class="extype" name="scala.Double">Double</span></span>)</span><span class="result"> extends <span class="extype" name="scala.Product">Product</span></span> + </span> + </h4> + <div class="fullcomment" id="comment"> + <div class="comment cmt"><p>A 2D vector.</p></div> + <dl class="paramcmts block"><dt class="param">x</dt><dd class="cmt"><p>1st component</p></dd><dt class="param">y</dt><dd class="cmt"><p>2nd component</p></dd></dl> - -<table summary="" cellpadding="3" class="member-detail"> - <tr><td class="title">Value Details</td></tr> - </table><div><a name="length"></a><dl> - <dt> - - <code></code> - <code>val</code> - <em>length</em> : <a href="http://www.scala-lang.org/docu/files/api/scala/Double.html" target="_self">Double</a> - </dt> - <dd></dd> - </dl> - <dl><dd>Norm or length of this vector.</dd></dl> - <dl></dl> - <hr></hr></div> -<table summary="" cellpadding="3" class="member-detail"> - <tr><td class="title">Method Details</td></tr> - </table><div><a name="%2B%28sims.geometry.Vector2D%29"></a><dl> - <dt> - - <code></code> - <code>def</code> - <em>+</em>(<em>v</em> : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a>) : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a> - </dt> - <dd></dd> - </dl> - <dl><dd>Vector addition.</dd></dl> - <dl></dl> - <hr></hr> -<a name="-%28sims.geometry.Vector2D%29"></a><dl> - <dt> - - <code></code> - <code>def</code> - <em>-</em>(<em>v</em> : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a>) : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a> - </dt> - <dd></dd> - </dl> - <dl><dd>Vector substraction.</dd></dl> - <dl></dl> - <hr></hr> -<a name="*%28Double%29"></a><dl> - <dt> - - <code></code> - <code>def</code> - <em>*</em>(<em>n</em> : <a href="http://www.scala-lang.org/docu/files/api/scala/Double.html" target="_self">Double</a>) : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a> - </dt> - <dd></dd> - </dl> - <dl><dd>Scalar multiplication.</dd></dl> - <dl></dl> - <hr></hr> -<a name="%2F%28Double%29"></a><dl> - <dt> - - <code></code> - <code>def</code> - <em>/</em>(<em>n</em> : <a href="http://www.scala-lang.org/docu/files/api/scala/Double.html" target="_self">Double</a>) : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a> - </dt> - <dd></dd> - </dl> - <dl><dd>Scalar division.</dd></dl> - <dl></dl> - <hr></hr> -<a name="unary_-"></a><dl> - <dt> - - <code></code> - <code>def</code> - <em>unary_-</em> : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a> - </dt> - <dd></dd> - </dl> - <dl><dd>Unary minus.</dd></dl> - <dl></dl> - <hr></hr> -<a name="dot%28sims.geometry.Vector2D%29"></a><dl> - <dt> - - <code></code> - <code>def</code> - <em>dot</em>(<em>v</em> : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a>) : <a href="http://www.scala-lang.org/docu/files/api/scala/Double.html" target="_self">Double</a> - </dt> - <dd></dd> - </dl> - <dl><dd>Dot product.</dd></dl> - <dl></dl> - <hr></hr> -<a name="cross%28sims.geometry.Vector2D%29"></a><dl> - <dt> - - <code></code> - <code>def</code> - <em>cross</em>(<em>v</em> : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a>) : <a href="http://www.scala-lang.org/docu/files/api/scala/Double.html" target="_self">Double</a> - </dt> - <dd></dd> - </dl> - <dl><dd>Cross product. Length only because in 2D. The direction would be given by the x3-axis.</dd></dl> - <dl></dl> - <hr></hr> -<a name="unit"></a><dl> - <dt> - - <code></code> - <code>def</code> - <em>unit</em> : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a> - </dt> - <dd></dd> - </dl> - <dl><dd>Unit vector.</dd></dl> - <dl></dl> - <hr></hr> -<a name="project%28sims.geometry.Vector2D%29"></a><dl> - <dt> - - <code></code> - <code>def</code> - <em>project</em>(<em>v</em> : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a>) : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a> - </dt> - <dd></dd> - </dl> - <dl><dd>Returns the projection of this vector onto the vector <code>v</code>.</dd></dl> - <dl></dl> - <hr></hr> -<a name="rotate%28Double%29"></a><dl> - <dt> - - <code></code> - <code>def</code> - <em>rotate</em>(<em>angle</em> : <a href="http://www.scala-lang.org/docu/files/api/scala/Double.html" target="_self">Double</a>) : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a> - </dt> - <dd></dd> - </dl> - <dl><dd>Returns a rotation of this vector by <code>angle</code> radian.</dd></dl> - <dl></dl> - <hr></hr> -<a name="leftNormal"></a><dl> - <dt> - - <code></code> - <code>def</code> - <em>leftNormal</em> : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a> - </dt> - <dd></dd> - </dl> - <dl><dd>Left normal vector. (-y, x)</dd></dl> - <dl></dl> - <hr></hr> -<a name="rightNormal"></a><dl> - <dt> - - <code></code> - <code>def</code> - <em>rightNormal</em> : <a href="../../sims/geometry/Vector2D.html" target="_self">Vector2D</a> - </dt> - <dd></dd> - </dl> - <dl><dd>Right normal vector. (y, -x)</dd></dl> - <dl></dl> - <hr></hr> -<a name="isNull"></a><dl> - <dt> - - <code></code> - <code>def</code> - <em>isNull</em> : <a href="http://www.scala-lang.org/docu/files/api/scala/Boolean.html" target="_self">Boolean</a> - </dt> - <dd></dd> - </dl> - <dl><dd>Checks if this vector is the null vector.</dd></dl> - <dl></dl> - <hr></hr> -<a name="components"></a><dl> - <dt> - - <code></code> - <code>def</code> - <em>components</em> : <a href="" target="contentFrame" class="scala/List">scala.List</a>[<a href="http://www.scala-lang.org/docu/files/api/scala/Double.html" target="_self">Double</a>] - </dt> - <dd></dd> - </dl> - <dl><dd>Returns a list of this vector's components.</dd></dl> - <dl></dl> - <hr></hr> -<a name="hashCode%28%29"></a><dl> - <dt> - - <code>override</code> - <code>def</code> - <em>hashCode</em> : <a href="http://www.scala-lang.org/docu/files/api/scala/Int.html" target="_self">Int</a> - </dt> - <dd></dd> - </dl> - <dl><dd>Returns a hash code value for the object.
- <p>
- The default hashing algorithm is platform dependent.
- Note that it is allowed for two objects to have identical hash
- codes (<code>o1.hashCode.equals(o2.hashCode)</code>) yet not be
- equal (<code>o1.equals(o2)</code> returns <code>false</code>). A
- degenerate implementation could always return <code>0</code>.
- However, it is required that if two objects are equal
- (<code>o1.equals(o2)</code> returns <code>true</code>) that they
- have identical hash codes
- (<code>o1.hashCode.equals(o2.hashCode)</code>). Therefore, when
- overriding this method, be sure to verify that the behavior is
- consistent with the <code>equals</code> method.
- </p>
- <p></dd></dl> - <dl><dt style="margin:10px 0 0 20px;"> - <b>Returns</b></dt><dd>the hash code value for the object. </p></dd></dl> - <hr></hr> -<a name="toString%28%29"></a><dl> - <dt> - - <code>override</code> - <code>def</code> - <em>toString</em> : <a href="" target="contentFrame" class="java/lang/String">java.lang.String</a> - </dt> - <dd></dd> - </dl> - <dl><dd>Returns a string representation of the object.
- <p>
- The default representation is platform dependent.</dd></dl> - <dl><dt style="margin:10px 0 0 20px;"> - <b>Returns</b></dt><dd>a string representation of the object. </p></dd></dl> - <hr></hr> -<a name="equals%28Any%29"></a><dl> - <dt> - - <code>override</code> - <code>def</code> - <em>equals</em>(<em>arg0</em> : <a href="http://www.scala-lang.org/docu/files/api/scala/Any.html" target="_self">Any</a>) : <a href="http://www.scala-lang.org/docu/files/api/scala/Boolean.html" target="_self">Boolean</a> - </dt> - <dd></dd> - </dl> - <dl><dd>This method is used to compare the receiver object (<code>this</code>)
- with the argument object (<code>arg0</code>) for equivalence.
-
- <p>
- The default implementations of this method is an <a
- href="http://en.wikipedia.org/wiki/Equivalence_relation">equivalence
- relation</a>:
- <ul>
- <li>It is reflexive: for any instance <code>x</code> of type <code>Any</code>,
- <code>x.equals(x)</code> should return <code>true</code>.</li>
- <li>It is symmetric: for any instances <code>x</code> and <code>y</code> of type
- <code>Any</code>, <code>x.equals(y)</code> should return <code>true</code> if and only
- if <code>y.equals(x)</code> returns <code>true</code>.</li>
- <li>It is transitive: for any instances
- <code>x</code>, <code>y</code>, and <code>z</code> of type <code>AnyRef</code>
- if <code>x.equals(y)</code> returns <code>true</code> and
- <code>y.equals(z)</code> returns
- <code>true</code>, then <code>x.equals(z)</code> should return <code>true</code>.</li>
- </ul>
- </p>
- <p>
- If you override this method, you should verify that
- your implementation remains an equivalence relation.
- Additionally, when overriding this method it is often necessary to
- override <code>hashCode</code> to ensure that objects that are
- "equal" (<code>o1.equals(o2)</code> returns <code>true</code>)
- hash to the same <a href="Int.html"><code>Int</code></a>
- (<code>o1.hashCode.equals(o2.hashCode)</code>).</dd></dl> - <dl><dt style="margin:10px 0 0 20px;"> - <b>Parameters</b></dt><dd><code>arg0 - </code>the object to compare against this object for equality.</dd><dt style="margin:10px 0 0 20px;"> - <b>Returns</b></dt><dd><code>true</code> if the receiver object is equivalent to the argument; <code>false</code> otherwise. </p></dd></dl> - <hr></hr> -<a name="productPrefix"></a><dl> - <dt> - - <code>override</code> - <code>def</code> - <em>productPrefix</em> : <a href="" target="contentFrame" class="java/lang/String">java.lang.String</a> - </dt> - <dd></dd> - </dl><dl> - <dt style="margin:10px 0 0 20px;"> - <b>Overrides</b> - </dt> - <dd> - <a href="" target="contentFrame" class="scala/Product">scala.Product</a>.<a href="#productPrefix" target="contentFrame" class="scala/Product">scala.Product.productPrefix</a> - </dd> - </dl><hr></hr> -<a name="productArity"></a><dl> - <dt> - - <code>override</code> - <code>def</code> - <em>productArity</em> : <a href="http://www.scala-lang.org/docu/files/api/scala/Int.html" target="_self">Int</a> - </dt> - <dd></dd> - </dl><dl> - <dt style="margin:10px 0 0 20px;"> - <b>Overrides</b> - </dt> - <dd> - <a href="" target="contentFrame" class="scala/Product">scala.Product</a>.<a href="#productArity" target="contentFrame" class="scala/Product">scala.Product.productArity</a> - </dd> - </dl><hr></hr> -<a name="productElement%28Int%29"></a><dl> - <dt> + + + </div> + + <div id="template"> + + <div id="mbrsel"> + <div id="ancestors"> + <h3>Inherits</h3> + <ol><li class="in" name="scala.Product">Product</li><li class="in" name="scala.Equals">Equals</li><li class="in" name="scala.AnyRef">AnyRef</li><li class="in" name="scala.Any">Any</li></ol> + </div> + </div> + + + + <div class="members" id="values"> + <h3>Value Members</h3> + <ol><li name="sims.geometry.Vector2D#*"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">*</span><span class="params">(<span name="n">n: <span class="extype" name="scala.Double">Double</span></span>)</span><span class="result">: <a href="" class="extype" name="sims.geometry.Vector2D">Vector2D</a></span> + </span> + </h4> + <p class="shortcomment cmt">Scalar multiplication</p><div class="fullcomment"> + <div class="comment cmt"><p>Scalar multiplication.</p></div> + + + + + </div> + </li><li name="sims.geometry.Vector2D#+"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">+</span><span class="params">(<span name="v">v: <a href="" class="extype" name="sims.geometry.Vector2D">Vector2D</a></span>)</span><span class="result">: <a href="" class="extype" name="sims.geometry.Vector2D">Vector2D</a></span> + </span> + </h4> + <p class="shortcomment cmt">Vector addition</p><div class="fullcomment"> + <div class="comment cmt"><p>Vector addition.</p></div> + + + + + </div> + </li><li name="sims.geometry.Vector2D#-"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">-</span><span class="params">(<span name="v">v: <a href="" class="extype" name="sims.geometry.Vector2D">Vector2D</a></span>)</span><span class="result">: <a href="" class="extype" name="sims.geometry.Vector2D">Vector2D</a></span> + </span> + </h4> + <p class="shortcomment cmt">Vector substraction</p><div class="fullcomment"> + <div class="comment cmt"><p>Vector substraction.</p></div> + + + + + </div> + </li><li name="sims.geometry.Vector2D#/"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">/</span><span class="params">(<span name="n">n: <span class="extype" name="scala.Double">Double</span></span>)</span><span class="result">: <a href="" class="extype" name="sims.geometry.Vector2D">Vector2D</a></span> + </span> + </h4> + <p class="shortcomment cmt">Scalar division</p><div class="fullcomment"> + <div class="comment cmt"><p>Scalar division.</p></div> + + + + + </div> + </li><li name="sims.geometry.Vector2D#canEqual"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">canEqual</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> + </span> + </h4> + + </li><li name="sims.geometry.Vector2D#components"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">components</span><span class="result">: <span class="extype" name="scala.collection.immutable.List">List</span>[<span class="extype" name="scala.Double">Double</span>]</span> + </span> + </h4> + <p class="shortcomment cmt">Returns a list of this vector's components</p><div class="fullcomment"> + <div class="comment cmt"><p>Returns a list of this vector's components.</p></div> + + + + + </div> + </li><li name="sims.geometry.Vector2D#cross"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">cross</span><span class="params">(<span name="v">v: <a href="" class="extype" name="sims.geometry.Vector2D">Vector2D</a></span>)</span><span class="result">: <span class="extype" name="scala.Double">Double</span></span> + </span> + </h4> + <p class="shortcomment cmt">Cross product</p><div class="fullcomment"> + <div class="comment cmt"><p>Cross product. Length only because in 2D. The direction would be given by the x3-axis.</p></div> + + + + + </div> + </li><li name="sims.geometry.Vector2D#dot"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">dot</span><span class="params">(<span name="v">v: <a href="" class="extype" name="sims.geometry.Vector2D">Vector2D</a></span>)</span><span class="result">: <span class="extype" name="scala.Double">Double</span></span> + </span> + </h4> + <p class="shortcomment cmt">Dot product</p><div class="fullcomment"> + <div class="comment cmt"><p>Dot product.</p></div> + + + + + </div> + </li><li name="sims.geometry.Vector2D#equals"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">equals</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> + </span> + </h4> + <p class="shortcomment cmt">This method is used to compare the receiver object (<code>this</code>) +with the argument object (<code>arg0</code>) for equivalence</p><div class="fullcomment"> + <div class="comment cmt"><p>This method is used to compare the receiver object (<code>this</code>) +with the argument object (<code>arg0</code>) for equivalence.</p><p><p> +The default implementations of this method is an <a +href="http://en.wikipedia.org/wiki/Equivalence_relation">equivalence +relation</a>: + <ul> + <li>It is reflexive: for any instance <code>x</code> of type <code>Any</code>, + <code>x.equals(x)</code> should return <code>true</code>.</li> + <li>It is symmetric: for any instances <code>x</code> and <code>y</code> of type + <code>Any</code>, <code>x.equals(y)</code> should return <code>true</code> if and only + if <code>y.equals(x)</code> returns <code>true</code>.</li> + <li>It is transitive: for any instances + <code>x</code>, <code>y</code>, and <code>z</code> of type <code>AnyRef</code> + if <code>x.equals(y)</code> returns <code>true</code> and + <code>y.equals(z)</code> returns + <code>true</code>, then <code>x.equals(z)</code> should return <code>true</code>.</li> +</ul> +</p></p><p><p> +If you override this method, you should verify that +your implementation remains an equivalence relation. +Additionally, when overriding this method it is often necessary to +override <code>hashCode</code> to ensure that objects that are +"equal" (<code>o1.equals(o2)</code> returns <code>true</code>) +hash to the same <a href="Int.html"><code>Int</code></a> +(<code>o1.hashCode.equals(o2.hashCode)</code>). +</p></div> + <dl class="paramcmts block"><dt class="param">arg0</dt><dd class="cmt"><p>the object to compare against this object for equality.</p></dd><dt>returns</dt><dd class="cmt"><p><code>true</code> if the receiver object is equivalent to the argument; <code>false</code> otherwise. +</p></p></dd></dl> + + + + </div> + </li><li name="sims.geometry.Vector2D#hashCode"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">hashCode</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span> + </span> + </h4> + <p class="shortcomment cmt">Returns a hash code value for the object</p><div class="fullcomment"> + <div class="comment cmt"><p>Returns a hash code value for the object.</p><p><p> +The default hashing algorithm is platform dependent.</p><p>Note that it is allowed for two objects to have identical hash +codes (<code>o1.hashCode.equals(o2.hashCode)</code>) yet not be +equal (<code>o1.equals(o2)</code> returns <code>false</code>). A +degenerate implementation could always return <code>0</code>. +However, it is required that if two objects are equal +(<code>o1.equals(o2)</code> returns <code>true</code>) that they +have identical hash codes +(<code>o1.hashCode.equals(o2.hashCode)</code>). Therefore, when +overriding this method, be sure to verify that the behavior is +consistent with the <code>equals</code> method. +</p></p><p><p></p></div> + + + + + </div> + </li><li name="sims.geometry.Vector2D#isNull"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">isNull</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> + </span> + </h4> + <p class="shortcomment cmt">Checks if this vector is the null vector</p><div class="fullcomment"> + <div class="comment cmt"><p>Checks if this vector is the null vector.</p></div> + + + + + </div> + </li><li name="sims.geometry.Vector2D#leftNormal"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">leftNormal</span><span class="result">: <a href="" class="extype" name="sims.geometry.Vector2D">Vector2D</a></span> + </span> + </h4> + <p class="shortcomment cmt">Left normal vector</p><div class="fullcomment"> + <div class="comment cmt"><p>Left normal vector. (-y, x)</p></div> + + + + + </div> + </li><li name="sims.geometry.Vector2D#length"> + <h4 class="signature"> + <span class="kind">val</span> + <span class="symbol"> + <span class="name">length</span><span class="result">: <span class="extype" name="scala.Double">Double</span></span> + </span> + </h4> + <p class="shortcomment cmt">Norm or length of this vector</p><div class="fullcomment"> + <div class="comment cmt"><p>Norm or length of this vector.</p></div> + + + + + </div> + </li><li name="sims.geometry.Vector2D#productArity"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">productArity</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span> + </span> + </h4> + + </li><li name="sims.geometry.Vector2D#productElement"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">productElement</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Int">Int</span></span>)</span><span class="result">: <span class="extype" name="scala.Any">Any</span></span> + </span> + </h4> + + </li><li name="scala.Product#productElements"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">productElements</span><span class="result">: <span class="extype" name="scala.collection.Iterator">Iterator</span>[<span class="extype" name="scala.Any">Any</span>]</span> + </span> + </h4> + + </li><li name="scala.Product#productIterator"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">productIterator</span><span class="result">: <span class="extype" name="scala.collection.Iterator">Iterator</span>[<span class="extype" name="scala.Any">Any</span>]</span> + </span> + </h4> + + </li><li name="sims.geometry.Vector2D#productPrefix"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">productPrefix</span><span class="result">: <span class="extype" name="java.lang.String">String</span></span> + </span> + </h4> + + </li><li name="sims.geometry.Vector2D#project"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">project</span><span class="params">(<span name="v">v: <a href="" class="extype" name="sims.geometry.Vector2D">Vector2D</a></span>)</span><span class="result">: <a href="" class="extype" name="sims.geometry.Vector2D">Vector2D</a></span> + </span> + </h4> + <p class="shortcomment cmt">Returns the projection of this vector onto the vector <code>v</code></p><div class="fullcomment"> + <div class="comment cmt"><p>Returns the projection of this vector onto the vector <code>v</code>.</p></div> + + + + + </div> + </li><li name="sims.geometry.Vector2D#rightNormal"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">rightNormal</span><span class="result">: <a href="" class="extype" name="sims.geometry.Vector2D">Vector2D</a></span> + </span> + </h4> + <p class="shortcomment cmt">Right normal vector</p><div class="fullcomment"> + <div class="comment cmt"><p>Right normal vector. (y, -x)</p></div> + + + + + </div> + </li><li name="sims.geometry.Vector2D#rotate"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">rotate</span><span class="params">(<span name="angle">angle: <span class="extype" name="scala.Double">Double</span></span>)</span><span class="result">: <a href="" class="extype" name="sims.geometry.Vector2D">Vector2D</a></span> + </span> + </h4> + <p class="shortcomment cmt">Returns a rotation of this vector by <code>angle</code> radian</p><div class="fullcomment"> + <div class="comment cmt"><p>Returns a rotation of this vector by <code>angle</code> radian.</p></div> + + + + + </div> + </li><li name="sims.geometry.Vector2D#toString"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">toString</span><span class="params">()</span><span class="result">: <span class="extype" name="java.lang.String">String</span></span> + </span> + </h4> + <p class="shortcomment cmt">Returns a string representation of the object</p><div class="fullcomment"> + <div class="comment cmt"><p>Returns a string representation of the object. +<p> +The default representation is platform dependent. +</p></div> + + + + + </div> + </li><li name="sims.geometry.Vector2D#unary_-"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">unary_-</span><span class="result">: <a href="" class="extype" name="sims.geometry.Vector2D">Vector2D</a></span> + </span> + </h4> + <p class="shortcomment cmt">Unary minus</p><div class="fullcomment"> + <div class="comment cmt"><p>Unary minus.</p></div> + + + + + </div> + </li><li name="sims.geometry.Vector2D#unit"> + <h4 class="signature"> + <span class="kind">def</span> + <span class="symbol"> + <span class="name">unit</span><span class="result">: <a href="" class="extype" name="sims.geometry.Vector2D">Vector2D</a></span> + </span> + </h4> + <p class="shortcomment cmt">Unit vector</p><div class="fullcomment"> + <div class="comment cmt"><p>Unit vector.</p></div> + + + + + </div> + </li><li name="sims.geometry.Vector2D#x"> + <h4 class="signature"> + <span class="kind">val</span> + <span class="symbol"> + <span class="name">x</span><span class="result">: <span class="extype" name="scala.Double">Double</span></span> + </span> + </h4> + + </li><li name="sims.geometry.Vector2D#y"> + <h4 class="signature"> + <span class="kind">val</span> + <span class="symbol"> + <span class="name">y</span><span class="result">: <span class="extype" name="scala.Double">Double</span></span> + </span> + </h4> + + </li></ol> + </div> + + <div class="members" id="constructors"> + <h3>Instance constructors</h3> + <ol><li name="sims.geometry.Vector2D#this"> + <h4 class="signature"> + <span class="kind">new</span> + <span class="symbol"> + <span class="name">Vector2D</span><span class="params">(<span name="x">x: <span class="extype" name="scala.Double">Double</span></span>, <span name="y">y: <span class="extype" name="scala.Double">Double</span></span>)</span> + </span> + </h4> + + </li><li name="scala.AnyRef#this"> + <h4 class="signature"> + <span class="kind">new</span> + <span class="symbol"> + <span class="name">Vector2D</span><span class="params">()</span> + </span> + </h4> + + </li></ol> + </div> - <code>override</code> - <code>def</code> - <em>productElement</em>(<em>arg0</em> : <a href="http://www.scala-lang.org/docu/files/api/scala/Int.html" target="_self">Int</a>) : <a href="http://www.scala-lang.org/docu/files/api/scala/Any.html" target="_self">Any</a> - </dt> - <dd></dd> - </dl><dl> - <dt style="margin:10px 0 0 20px;"> - <b>Overrides</b> - </dt> - <dd> - <a href="" target="contentFrame" class="scala/Product">scala.Product</a>.<a href="#productElement" target="contentFrame" class="scala/Product">scala.Product.productElement</a> - </dd> - </dl><hr></hr></div> - - - <hr></hr> - <table summary="" class="navigation"> - <tr> - <td class="navigation-links" valign="top"> - <!-- <table><tr></tr></table> --> - </td> - <td align="right" valign="top" style="white-space:nowrap;" rowspan="2"> - <div class="doctitle-larger">SiMS</div> - </td> - </tr> - <tr><td></td></tr> - </table> - </body> + </div> + + </body> </html>
\ No newline at end of file |