src/main/java/de/javagl/geom/AffineTransforms.java
/**
     * Creates a function that returns an affine transform that performs
     * a rotation according to value returned by the given function.
     * 
     * @param <T> The function argument type
     * 
     * @param angleRadFunction The function that returns the rotation angle,
     * in radians
     * @return The function
     */
Creates a function that returns an affine transform that performs
a rotation according to value returned by the given function.

@param  The function argument type

@param angleRadFunction The function that returns the rotation angle,
in radians
@return The function
Creates a function that returns an affine transform that performs a rotation according to value returned by the given function . @param The function argument type @param angleRadFunction The function that returns the rotation angle in radians @return The function
public static <T> Function<T, AffineTransform> rotating(
        final ToDoubleFunction<? super T> angleRadFunction)
    {
        return new Function<T, AffineTransform>()
        {
            @Override
            public AffineTransform apply(T t)
            {
                double angleRad = angleRadFunction.applyAsDouble(t);
                return AffineTransform.getRotateInstance(angleRad);
            }
        };
    }
public static < T > Function < T , AffineTransform > rotating ( final ToDoubleFunction < ? super T > angleRadFunction ) { return new Function < T , AffineTransform > ( ) { @ Override public AffineTransform apply ( T t ) { double angleRad = angleRadFunction . applyAsDouble ( t ) ; return AffineTransform . getRotateInstance ( angleRad ) ; } } ; }
Creates a function that returns an affine transform that performs
 a rotation according to value returned by the given function.
Creates a function that returns an affine transform that performs a rotation according to value returned by the given function .