Navaron Bracke

removve redundant double conversions

@@ -549,16 +549,16 @@ extension VNBarcodeObservation { @@ -549,16 +549,16 @@ extension VNBarcodeObservation {
549 public func toMap() -> [String: Any?] { 549 public func toMap() -> [String: Any?] {
550 return [ 550 return [
551 "corners": [ 551 "corners": [
552 - ["x": Double(topLeft.x), "y": Double(topLeft.y)],  
553 - ["x": Double(topRight.x), "y": Double(topRight.y)],  
554 - ["x": Double(bottomRight.x), "y": Double(bottomRight.y)],  
555 - ["x": Double(bottomLeft.x), "y": Double(bottomLeft.y)], 552 + ["x": topLeft.x, "y": topLeft.y],
  553 + ["x": topRight.x, "y": topRight.y],
  554 + ["x": bottomRight.x, "y": bottomRight.y],
  555 + ["x": bottomLeft.x, "y": bottomLeft.y],
556 ], 556 ],
557 "format": symbology.toInt ?? -1, 557 "format": symbology.toInt ?? -1,
558 "rawValue": payloadStringValue ?? "", 558 "rawValue": payloadStringValue ?? "",
559 "size": [ 559 "size": [
560 - "width": Double(distanceBetween(topLeft, topRight)),  
561 - "height": Double(distanceBetween(topLeft, bottomLeft)), 560 + "width": distanceBetween(topLeft, topRight),
  561 + "height": distanceBetween(topLeft, bottomLeft),
562 ], 562 ],
563 ] 563 ]
564 } 564 }