Translates screen x-coordinate to cartesian coordinate.
@param x
@return
336188
public double fromScreenX(double x)
    {
        Point2D src = srcPnt.get();
        Point2D dst = dstPnt.get();
        src.setLocation(x, 0);
        inverse.transform(src, dst);
        return dst.getX();
    }
762604
public static Geometry translate(Geometry geom, double x, double y, double z) {
        if (geom == null) {
            return null;
        }
        final CoordinateSequenceDimensionFilter filter =
                new CoordinateSequenceDimensionFilter();
        geom.apply(filter);
        checkMixed(filter);
        // For all 2D geometries, we only translate by (x, y).
        if (filter.is2D()) {
            return AffineTransformation.translationInstance(x, y).transform(geom);
        } else {
            final Geometry clone = geom.copy();
            clone.apply(new ZAffineTransformation(x, y, z));
            return clone;
        }
    }
969079
private int getSegmentForX(int x) {
        if (autoScroll.get()) {
            int playHead = (x - (getWidth() / 2));
            int offset = Util.timeToHalfFrame(getFurthestPlaybackPosition()) / scale.get();
            return  (playHead + offset) * scale.get();
        }
        return x * scale.get();
    }
1066943
function getTranslation(viewport) {
  let x;
  let y;

  // Modulus 360 on the rotation so that we only
  // have to worry about four possible values.
  switch(viewport.rotation % 360) {
    case 0:
      x = y = 0;
      break;
    case 90:
      x = 0;
      y = (viewport.width / viewport.scale) * -1;
      break;
    case 180:
      x = (viewport.width / viewport.scale) * -1;
      y = (viewport.height / viewport.scale) * -1;
      break;
    case 270:
      x = (viewport.height / viewport.scale) * -1;
      y = 0;
      break;
  }

  return { x, y };
}
1361738
public Coordinate tileTopLeft(int tx, int ty, int zoomLevel) {
        int px = tx * tileSize;
        int py = ty * tileSize;
        Coordinate result = pixelsToMeters(px, py, zoomLevel);
        return result;
    }
151759
public double[] postConvert(double[] X) {
		if (X.length != standardN) {
			throw new IllegalArgumentException("wrong array dimension: " + X.length);
		}
		double[] ret = new double[originalN];
		int cntSplitted = 0;
		for (int i = standardS; i < standardN; i++) {
			if (splittedVariablesList.contains(i - standardS)) {
				// this variable was splitted: x = xPlus-xMinus
				ret[i - standardS] = X[i] - X[standardN + cntSplitted];
				cntSplitted++;
			} else {
				ret[i - standardS] = X[i];
			}
		}
		// this.postconvertedX = ret;
		return ret;
	}
17060
public int pointToPosition(int x, int y) {
        Rect frame = mTouchFrame;
        if (frame == null) {
            mTouchFrame = new Rect();
            frame = mTouchFrame;
        }

        final int count = getChildCount();
        for (int i = count - 1; i >= 0; i--) {
            View child = getChildAt(i);
            if (child.getVisibility() == View.VISIBLE) {
                child.getHitRect(frame);
                if (frame.contains(x, y)) {
                    return mFirstPosition + i;
                }
            }
        }
        return INVALID_POSITION;
    }
498268
public Translation to(float x, float y, float z)
	{
		toX = x;
		toY = y;
		toZ = z;
		return this;
	}
272044
@Override 
    public double fromReal(double x) {
        long sign = POSITIVE;
        if (x < 0) {
            sign = NEGATIVE;
            x = -x;  
        }
        return compact(sign, FastMath.log(x));
    }
202575
public Matrix4d translation(Vector3dc offset) {
        return translation(offset.x(), offset.y(), offset.z());
    }
744753
function getComponentAt(x, y) {
            if (this.$translateX !== 0 || this.$translateY !== 0 || this.$rotateValue !== 0 || this.$scaleX !== 1 || this.$scaleY !== 1) {
                var xy = this.project(x, y);
                return this.$super(xy[0], xy[1]);
            } else {
                return this.$super(x, y);
            }
        }
756783
public SVGPath quadTo(double c1x, double c1y, double x, double y) {
    return append(PATH_QUAD_TO).append(c1x).append(c1y).append(x).append(y);
  }
872976
private void setTranslate(float x, float y) {
        if (Math.abs(x) > 1 || Math.abs(y) > 1) {
            throw new IllegalArgumentException("Parallax effect cannot translate more than 100% of its off-screen size");
        }

        float xScale, yScale;

        if (mScaledIntensities) {
            // Set both scales to their offset values
            xScale = mXOffset;
            yScale = mYOffset;
        } else {
            // Set both scales to the max offset (should be negative, so smaller absolute value)
            xScale = Math.max(mXOffset, mYOffset);
            yScale = Math.max(mXOffset, mYOffset);
        }

        // Make sure below maximum jump limit
        if (mMaximumJump > 0) {
            // Limit x jump
            if (x - mXTranslation / xScale > mMaximumJump) {
                x = mXTranslation / xScale + mMaximumJump;
            } else if (x - mXTranslation / xScale < -mMaximumJump) {
                x = mXTranslation / xScale - mMaximumJump;
            }

            // Limit y jump
            if (y - mYTranslation / yScale > mMaximumJump) {
                y = mYTranslation / yScale + mMaximumJump;
            } else if (y - mYTranslation / yScale < -mMaximumJump) {
                y = mYTranslation / yScale - mMaximumJump;
            }
        }

        mXTranslation = x * xScale;
        mYTranslation = y * yScale;

        configureMatrix();
    }
1265010
def scaleX(self, x):
        ''
        return round(self.plotviewBox.xmin+(x-self.visibleBox.xmin)*self.xScaler)
274977
protected Rectangle getRectOnScreen (JComponent comp)
    {
        Rectangle r = comp.getVisibleRect();
        Point p = comp.getLocationOnScreen();
        r.translate(p.x, p.y);
        return r;
    }
157888
public static DoubleMatrix cosi(DoubleMatrix x) { 
		/*# mapfct('Math.cos') #*/
//RJPP-BEGIN------------------------------------------------------------
	   for (int i = 0; i < x.length; i++)
	      x.put(i, (double) Math.cos(x.get(i)));
	   return x;
//RJPP-END--------------------------------------------------------------
	}
763001
public static AffineTransformation axisProjection(int dim, int ax1, int ax2) {
    // setup a projection to get the data into the interval -1:+1 in each
    // dimension with the intended-to-see dimensions first.
    AffineTransformation proj = AffineTransformation.reorderAxesTransformation(dim, ax1, ax2);
    // Assuming that the data was normalized on [0:1], center it:
    double[] trans = new double[dim];
    for(int i = 0; i < dim; i++) {
      trans[i] = -.5;
    }
    proj.addTranslation(trans);
    // mirror on the y axis, since the SVG coordinate system is screen
    // coordinates (y = down) and not mathematical coordinates (y = up)
    proj.addAxisReflection(2);
    // scale it up
    proj.addScaling(SCALE);

    return proj;
  }