O1Library Docs
Fall 2023
Docs API

# GridPos

o1.grid.GridPos$
See the GridPos companion class
object GridPos

This companion object of class `GridPos` provides a couple of utility methods.

## Attributes

Companion
  class
Graph
Supertypes
  trait Product
  trait Mirror
  class Object
  trait Matchable
  class Any
Self type
  GridPos.type

## Members list

### Type members

#### Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

## Attributes

Inherited from:
  Mirror

type MirroredLabel <: String

The name of the type

The name of the type

## Attributes

Inherited from:
  Mirror

### Value members

#### Concrete methods

def random(xMin: Int, xMax: Int, yMin: Int, yMax: Int): GridPos

Returns a randomly constructed `GridPos` whose `x` and `y` are between the given minima (inclusive) and maxima (exclusive).

Returns a randomly constructed `GridPos` whose `x` and `y` are between the given minima (inclusive) and maxima (exclusive).

## Attributes

def random(min: Int, max: Int): GridPos

Returns a randomly constructed `GridPos` whose `x` and `y` are between the given minimum (inclusive) and maximum (exclusive). The limits for `x` and `y` are the same.

Returns a randomly constructed `GridPos` whose `x` and `y` are between the given minimum (inclusive) and maximum (exclusive). The limits for `x` and `y` are the same.

## Attributes