diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2018-10-14 11:42:53 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2018-10-14 11:42:53 -0400 |
| commit | 8f42378c707c8c962082e394fe67ac3bb5cd557b (patch) | |
| tree | 9b4070c764b8d0ed792d9f79a66fc169a237b949 /CSMath/src/bezier/transforms/geom/TDHRotation.java | |
| parent | f778a81e81506a4db455a6f506571c6bba935bf2 (diff) | |
General cleanup
Diffstat (limited to 'CSMath/src/bezier/transforms/geom/TDHRotation.java')
| -rw-r--r-- | CSMath/src/bezier/transforms/geom/TDHRotation.java | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/CSMath/src/bezier/transforms/geom/TDHRotation.java b/CSMath/src/bezier/transforms/geom/TDHRotation.java deleted file mode 100644 index 8870b53..0000000 --- a/CSMath/src/bezier/transforms/geom/TDHRotation.java +++ /dev/null @@ -1,57 +0,0 @@ -package bezier.transforms.geom;
-
-import bezier.geom.TDHPoint;
-
-public class TDHRotation implements TDHTransform {
- public final double theta;
-
- public TDHRotation(double theta) {
- this.theta = theta;
- }
-
- @Override
- public TDHPoint transform(TDHPoint punkt) {
- double x = (punkt.x * Math.cos(theta)) - (punkt.y * Math.sin(theta));
- double y = (punkt.x * Math.sin(theta)) - (punkt.y * Math.cos(theta));
-
- return new TDHPoint(x, y, punkt.z);
- }
-
- public double[][] matrix() {
- return new double[][] { new double[] { Math.cos(theta), Math.sin(theta), 0 },
- new double[] { -Math.sin(theta), Math.cos(theta), 0 }, new double[] { 0, 0, 1 } };
- }
-
- public TDHTransform invert() {
- return new TDHRotation(-theta);
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- long temp;
- temp = Double.doubleToLongBits(theta);
- result = prime * result + (int) (temp ^ (temp >>> 32));
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- TDHRotation other = (TDHRotation) obj;
- if (Double.doubleToLongBits(theta) != Double.doubleToLongBits(other.theta))
- return false;
- return true;
- }
-
- @Override
- public String toString() {
- return "TDHRotation [theta=" + theta + "]";
- }
-}
\ No newline at end of file |
