MCPcopy
hub / github.com/camelot-dev/camelot / translate

Function translate

camelot/utils.py:271–287  ·  view source on GitHub ↗

Translate x2 by x1. Parameters ---------- x1 : float The offset to apply. x2 : float The original y-coordinate. Returns ------- float The translated y-coordinate.

(x1: float, x2: float)

Source from the content-addressed store, hash-verified

269
270
271def translate(x1: float, x2: float) -> float:
272 """Translate x2 by x1.
273
274 Parameters
275 ----------
276 x1 : float
277 The offset to apply.
278 x2 : float
279 The original y-coordinate.
280
281 Returns
282 -------
283 float
284 The translated y-coordinate.
285
286 """
287 return x2 + x1
288
289
290def scale(value: float, factor: float) -> float:

Callers 4

scale_pdfFunction · 0.85
scale_imageFunction · 0.85
grid_to_pdf_cols_rowsFunction · 0.85
_ocr_wordsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected