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

@param  The function argument type

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