O1Library Docs
Fall 2023
Docs API

# HasPos

o1.world.objects.HasPos
trait HasPos

A supertype for objects that have a location in two-dimensional space.

## Attributes

Graph
Supertypes
  class Object
  trait Matchable
  class Any
Known subtypes
  trait HasEdges
  trait HasContainer
  trait ContainedObject
  trait MovingObjectInContainer
  trait HasVelocity
  trait MovingObject
  trait MutablePos
  Show all

## Members list

### Value members

#### Abstract methods

def pos: Pos

the object’s location

the object’s location

## Attributes

#### Concrete methods

def distance(another: HasPos): Double

Determines the distance (“as the crow flies”) between this object’s `pos` and that of the given object.

Determines the distance (“as the crow flies”) between this object’s `pos` and that of the given object.

## Attributes