O1Library Docs
Fall 2023
Docs API

# MutablePos

o1.world.objects.mutable$.MutablePos
trait MutablePos extends HasPos

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

## Attributes

Graph
Supertypes
  trait HasPos
  class Object
  trait Matchable
  class Any
Known subtypes
  trait ContainedObject
  trait MovingObjectInContainer
  trait MovingObject

## Members list

### Value members

#### Inherited 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

Inherited from:
  HasPos

#### Abstract fields

var pos: Pos

the object’s location

the object’s location

## Attributes