Added implementations for Quaternions to represent rotation values and Interpolators using the Slerp/Lerp algorithm

We might remove this later as it isn't used and requires the Apache Commons Math Library
This commit is contained in:
CrushedPixel
2015-07-21 03:50:36 +02:00
parent f5a9723646
commit 21b02e7e80
3 changed files with 146 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
package eu.crushedpixel.replaymod.holders;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Quaternion {
private double w, x, y, z;
public double dotProduct(Quaternion other) {
return (this.getX() * other.getX() + this.getY() * other.getY() +
this.getZ() * other.getZ() + this.getW() * other.getW());
}
}