All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mmb.content.ppipe.Path Maven / Gradle / Ivy

Go to download

Dependency for the MultiMachineBuilder, a voxel game about building an industrial empire in a finite world. THIS RELEASE IS NOT PLAYABLE. To play the game, donwload from >ITCH.IO LINK HERE< or >GH releases link here<

There is a newer version: 0.6
Show newest version
/**
 * 
 */
package mmb.content.ppipe;

import org.joml.Vector2d;

/**
 * @author oskar
 * A straight line path
 */
public class Path {
	public double beginX;
	public double beginY;
	public double endX;
	public double endY;
	public double length;
	/**
	 * @param progress
	 * @param out
	 */
	public void interpolate(double progress, Vector2d out) {
		double t = progress/length;
		out.x = (t*endX)+((1-t)*beginX);
		out.y = (t*endY)+((1-t)*beginY);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy