Skip to content

Point

Mojo struct 🡭

Point

@memory_only
struct Point

An integer 2D coordinate.

Fields

  • x (Int)
  • y (Int)

Implemented traits

AnyType, Copyable, Deinitable, ImplicitlyCopyable, Movable

Methods

__init__

fn def __init__(out self, x: Int, y: Int)

An integer 2D coordinate.

Args:

  • x (Int): Column.
  • y (Int): Row.
  • self (Self)

Returns:

Self