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:
@@ -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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user