CoreVector2I

CoreVector2I

Integer-based 2D vector for grid positions Engine-agnostic equivalent of Godot’s CoreVector2I

Project: GridPlacement v6.0
Layer: Core
Source: Core/Types/CoreVector2I.cs
Namespace: GridBuilding.Core.Types
Kind: struct

Parsing Method: AST-based (Roslyn) - NOT regex

⚠️ IMPORTANT: This documentation was generated using AST parsing, not regex.

Properties

Zero

Zero vector (0, 0)

One

One vector (1, 1)

Up

Up vector (0, -1)

Down

Down vector (0, 1)

Left

Left vector (-1, 0)

Right vector (1, 0)

Methods

Equals

Compares this CoreVector2I to another for equality

Returns: bool

Parameters:

  • CoreVector2I other

Equals

Compares this CoreVector2I to an object for equality

Returns: bool

Parameters:

  • object? obj

GetHashCode

Returns the hash code for this CoreVector2I

Returns: int

ToString

Returns a string representation of the CoreVector2I

Returns: string

DistanceTo

Calculates the distance to another CoreVector2I

Returns: float

Parameters:

  • CoreVector2I other

DistanceSquaredTo

Calculates the squared distance to another CoreVector2I (faster than DistanceTo)

Returns: int

Parameters:

  • CoreVector2I other