/** * Creates a <code>PrecisionModel</code> that specifies Fixed precision. Fixed-precision * coordinates are represented as precise internal coordinates, which are rounded to the grid * defined by the scale factor. * * @param scale amount by which to multiply a coordinate after subtracting the offset, to obtain a * precise coordinate * @param offsetX not used. * @param offsetY not used. * @deprecated offsets are no longer supported, since internal representation is rounded floating * point */ public PrecisionModel(double scale, double offsetX, double offsetY) { modelType = FIXED; setScale(scale); }
/** * Creates a <code>PrecisionModel</code> that specifies Fixed precision. Fixed-precision * coordinates are represented as precise internal coordinates, which are rounded to the grid * defined by the scale factor. * * @param scale amount by which to multiply a coordinate after subtracting the offset, to obtain a * precise coordinate */ public PrecisionModel(double scale) { modelType = FIXED; setScale(scale); }
/** * Creates a <code>PrecisionModel</code> that specifies an explicit precision model type. If the * model type is FIXED the scale factor will default to 1. * * @param modelType the type of the precision model */ public PrecisionModel(Type modelType) { this.modelType = modelType; if (modelType == FIXED) { setScale(1.0); } }