MapUtil.GetLeftBorder C# (CSharp) Method

GetLeftBorder() public static method

public static GetLeftBorder ( float x ) : int
x float
return int
    public static int GetLeftBorder(float x)
    {
        return Mathf.FloorToInt (x);
    }

Usage Example

Exemplo n.º 1
0
    private ICollection <Vec2> GetPotentialTiles(Vec2 point, Vector2 normal)
    {
        List <Vec2> tiles = new List <Vec2> ();

        for (int i = 1; i <= extra; i++)
        {
            Vector2 newPoint = new Vector2(point.x, point.y) + normal * i;
            tiles.Add(new Vec2(MapUtil.GetLeftBorder(newPoint.x), MapUtil.GetLowerBorder(newPoint.y)));
        }

        return(tiles);
    }
All Usage Examples Of MapUtil::GetLeftBorder