Example usage for com.badlogic.gdx.math Rectangle setPosition

List of usage examples for com.badlogic.gdx.math Rectangle setPosition

Introduction

In this page you can find the example usage for com.badlogic.gdx.math Rectangle setPosition.

Prototype

public Rectangle setPosition(Vector2 position) 

Source Link

Document

Sets the x and y-coordinates of the bottom left corner from vector

Usage

From source file:com.flatfisk.gnomp.math.GeometryUtils.java

License:Apache License

/**
 * @see #keepWithin(float, float, float, float, float, float, float, float)
 *//*from   w  w  w .  j a  v  a2s.c  om*/
public static Rectangle keepWithin(Rectangle rect, Rectangle other) {
    return rect.setPosition(
            keepWithin(rect.x, rect.y, rect.width, rect.height, other.x, other.y, other.width, other.height));
}