 }
 
 extension Double {
-    func toString() -> String {
+    func serialize() -> String {
         return abs(self.remainder(dividingBy: 1)) > 0.00001 ? String(self) : String(Int(self.rounded()))
     }
 }

            if ([place.dx, place.dy] == [0.0, 0.0]) {
                return ""
            }
            return " transform=\"translate(\(place.dx.toString()),\(place.dy.toString()))\" "
        }
        let matrixArgs = [place.m11, place.m12, place.m21, place.m22, place.dx, place.dy].map { $0.toString() }.joined(separator: ",")
        return " transform=\"matrix(\(matrixArgs))\" "
    }



    fileprivate func arcToSVG(_ arc: Arc) -> String {
        if arc.shift == 0.0 && abs(arc.extent - .pi * 2.0) < SVGEpsilon {
            return tag(SVGEllipseOpenTag, ["cx": arc.ellipse.cx.serialize(), "cy": arc.ellipse.cy.serialize(), "rx": arc.ellipse.rx.serialize(), "ry": arc.ellipse.ry.serialize()])
        } else {
            let rx = arc.ellipse.rx
            let ry = arc.ellipse.ry
