src/api/pdfrenderer.cpp
static double prec(double x) {
  double kPrecision = 1000.0;
  double a = round(x * kPrecision) / kPrecision;
  if (a == -0) {
    return 0;
  }
  return a;
}
// Helper function to prevent us from accidentally writing
// scientific notation to an HOCR or PDF file. Besides, three
// decimal points are all you really need.
Helper function to prevent us from accidentally writing
scientific notation to an HOCR or PDF file. Besides, three
decimal points are all you really need.
Helper function to prevent us from accidentally writing scientific notation to an HOCR or PDF file . Besides three decimal points are all you really need .
static double prec(double x) {
  double kPrecision = 1000.0;
  double a = round(x * kPrecision) / kPrecision;
  if (a == -0) {
    return 0;
  }
  return a;
}
static double prec ( double x ) { double kPrecision = 1000.0 ; double a = round ( x * kPrecision ) / kPrecision ; if ( a == -0 ) { return 0 ; } return a ; }
Helper function to prevent us from accidentally writing
scientific notation to an HOCR or PDF file.
Helper function to prevent us from accidentally writing scientific notation to an HOCR or PDF file .