org.psjava.formula.geometry.MiddlePoint Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of psjava Show documentation
Show all versions of psjava Show documentation
Problem Solving Library for Java
The newest version!
package org.psjava.formula.geometry;
import org.psjava.ds.geometry.Point2D;
import org.psjava.ds.numbersystrem.MultipliableNumberSystem;
import org.psjava.formula.MiddleValue;
public class MiddlePoint {
public static Point2D calc(MultipliableNumberSystem ns, Point2D p1, Point2D p2, T rateOf2) {
T x = MiddleValue.calc(ns, p1.x(), p2.x(), rateOf2);
T y = MiddleValue.calc(ns, p1.y(), p2.y(), rateOf2);
return Point2D.create(x, y);
}
private MiddlePoint() {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy