src/main/java/de/javagl/geom/AffineTransforms.java
/**
     * Creates a function that returns an affine transform that performs
     * a translation according to values returned by the given functions.
     * 
     * @param <T> The function argument type
     * 
     * @param xTranslationFunction The function that returns the x-translation
     * @param yTranslationFunction The function that returns the y-translation
     * @return The function
     */
Creates a function that returns an affine transform that performs
a translation according to values returned by the given functions.

@param  The function argument type

@param xTranslationFunction The function that returns the x-translation
@param yTranslationFunction The function that returns the y-translation
@return The function
Creates a function that returns an affine transform that performs a translation according to values returned by the given functions . @param The function argument type @param xTranslationFunction The function that returns the x - translation @param yTranslationFunction The function that returns the y - translation @return The function
public static <T> Function<T, AffineTransform> translate(
        final ToDoubleFunction<? super T> xTranslationFunction,
        final ToDoubleFunction<? super T> yTranslationFunction)
    {
        return new Function<T, AffineTransform>()
        {
            @Override
            public AffineTransform apply(T t)
            {
                double x = xTranslationFunction.applyAsDouble(t);
                double y = yTranslationFunction.applyAsDouble(t);
                return AffineTransform.getTranslateInstance(x, y);
            }
        };
    }
public static < T > Function < T , AffineTransform > translate ( final ToDoubleFunction < ? super T > xTranslationFunction , final ToDoubleFunction < ? super T > yTranslationFunction ) { return new Function < T , AffineTransform > ( ) { @ Override public AffineTransform apply ( T t ) { double x = xTranslationFunction . applyAsDouble ( t ) ; double y = yTranslationFunction . applyAsDouble ( t ) ; return AffineTransform . getTranslateInstance ( x , y ) ; } } ; }
Creates a function that returns an affine transform that performs
 a translation according to values returned by the given functions.
Creates a function that returns an affine transform that performs a translation according to values returned by the given functions .