What's the best way to implement Affine Transformations in Scala? There don't seem to be any in the standard library or in Spire. The AWT AffineTransformation class is horribly mutable and I definitely don't want to mutate the Graphics2D class. Is it more efficient to write my own or to wrap the Java class in value returning functions, or is there already a suitable Scala library?
Edit: I don't think the basic equations are too challenging to code. The complication seem to be adding special cases for 90/180/270 rotations and dealing with int/ double/ float conversions for a comprehensive solution.