Skip to content

Commit

Permalink
fix incorrect angle implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam-Belliveau committed Jan 8, 2022
1 parent 63fbf92 commit f6f0aa1
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
20 changes: 10 additions & 10 deletions docs/com/stuypulse/stuylib/math/Angle.html
Original file line number Diff line number Diff line change
Expand Up @@ -348,27 +348,27 @@ <h3>Method Summary</h3>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="Angle.html" title="class in com.stuypulse.stuylib.math">Angle</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#halfTurn()">halfTurn</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hashCode()">hashCode</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="Angle.html" title="class in com.stuypulse.stuylib.math">Angle</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#mul(double)">mul</a></span>&#8203;(double&nbsp;scale)</code></th>
<td class="colLast">
<div class="block">Multiply the angle by a scalar value</div>
</td>
</tr>
<tr id="i18" class="altColor">
<tr id="i17" class="rowColor">
<td class="colFirst"><code><a href="Angle.html" title="class in com.stuypulse.stuylib.math">Angle</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#negative()">negative</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code><a href="Angle.html" title="class in com.stuypulse.stuylib.math">Angle</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#opposite()">opposite</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sin()">sin</a></span>()</code></th>
Expand Down Expand Up @@ -917,13 +917,13 @@ <h4>negative</h4>
</dl>
</li>
</ul>
<a id="halfTurn()">
<a id="opposite()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>halfTurn</h4>
<pre class="methodSignature">public&nbsp;<a href="Angle.html" title="class in com.stuypulse.stuylib.math">Angle</a>&nbsp;halfTurn()</pre>
<h4>opposite</h4>
<pre class="methodSignature">public&nbsp;<a href="Angle.html" title="class in com.stuypulse.stuylib.math">Angle</a>&nbsp;opposite()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an angle rotated by 180 degrees or Pi radians</dd>
Expand Down
4 changes: 2 additions & 2 deletions docs/index-all.html
Original file line number Diff line number Diff line change
Expand Up @@ -1163,8 +1163,6 @@ <h2 class="title">G</h2>
</a>
<h2 class="title">H</h2>
<dl>
<dt><span class="memberNameLink"><a href="com/stuypulse/stuylib/math/Angle.html#halfTurn()">halfTurn()</a></span> - Method in class com.stuypulse.stuylib.math.<a href="com/stuypulse/stuylib/math/Angle.html" title="class in com.stuypulse.stuylib.math">Angle</a></dt>
<dd>&nbsp;</dd>
<dt><a href="com/stuypulse/stuylib/util/HashBuilder.html" title="class in com.stuypulse.stuylib.util"><span class="typeNameLink">HashBuilder</span></a> - Class in <a href="com/stuypulse/stuylib/util/package-summary.html">com.stuypulse.stuylib.util</a></dt>
<dd>
<div class="block">A class used to generate HashCodes by combining multiple different objects / types.</div>
Expand Down Expand Up @@ -1593,6 +1591,8 @@ <h2 class="title">O</h2>
<dd>
<div class="block">Opens network table on local device.</div>
</dd>
<dt><span class="memberNameLink"><a href="com/stuypulse/stuylib/math/Angle.html#opposite()">opposite()</a></span> - Method in class com.stuypulse.stuylib.math.<a href="com/stuypulse/stuylib/math/Angle.html" title="class in com.stuypulse.stuylib.math">Angle</a></dt>
<dd>&nbsp;</dd>
</dl>
<a id="I:P">
<!-- -->
Expand Down
2 changes: 1 addition & 1 deletion docs/member-search-index.js

Large diffs are not rendered by default.

Binary file modified docs/member-search-index.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/overview-summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.10) on Tue Jan 04 10:35:45 EST 2022 -->
<!-- Generated by javadoc (11.0.10) on Sat Jan 08 12:03:19 EST 2022 -->
<title>StuyLib 1.0.0 API</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">window.location.replace('index.html')</script>
Expand Down
Binary file modified docs/package-search-index.zip
Binary file not shown.
Binary file modified docs/type-search-index.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions src/com/stuypulse/stuylib/math/Angle.java
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ public Angle negative() {
}

/** @return an angle rotated by 180 degrees or Pi radians */
public Angle halfTurn() {
return fromRadians(0.0 - this.toRadians());
public Angle opposite() {
return fromRadians(PI + this.toRadians());
}

/** @return the sine value of this angle */
Expand Down
2 changes: 1 addition & 1 deletion src/com/stuypulse/stuylib/math/Polar2D.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public Polar2D(double mag, Angle ang) {
angle = ang;
} else {
magnitude = -mag;
angle = ang.negative();
angle = ang.opposite();
}
}

Expand Down

0 comments on commit f6f0aa1

Please sign in to comment.