public long lengthSquared() { return lengthSquared(x, y); }
/** * Set the x and y components to the supplied value. * * @param s * scalar value of both components * @return this */ public Vector2i set(int s) { return set(s, s); }
public double distance(Vector2ic v) { return Math.sqrt(distanceSquared(v)); }
public IntBuffer get(IntBuffer buffer) { return get(buffer.position(), buffer); }
/** * Update. * * @param targetWidth the target width * @param targetHeight the target height * @param framebufferWidth the framebuffer width * @param framebufferHeight the framebuffer height * @param targetPosX the target pos x * @param targetPosY the target pos y * @param iconified the iconified */ public void update(int targetWidth, int targetHeight, int framebufferWidth, int framebufferHeight, int targetPosX, int targetPosY, boolean iconified) { setWindowSize(new Vector2i(targetWidth, targetHeight)); setFramebufferSize(new Vector2i(framebufferWidth, framebufferHeight)); setPixelRatio((float) framebufferWidth / (float) targetWidth); setWindowPosition(new Vector2f(targetPosX, targetPosY)); setIconified(iconified); }
/** * Set the x and y components to the supplied value. * * @param s * scalar value of both components * @return this */ public Vector2i set(int s) { return set(s, s); }
public double distance(int x, int y) { return Math.sqrt(distanceSquared(x, y)); }
public ByteBuffer get(ByteBuffer buffer) { return get(buffer.position(), buffer); }