v2i

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package v2i provides a 2D integer vector type with method-chainable arithmetic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vec

type Vec v2isdf.Vec

Vec is a 2D integer vector with X, Y int components.

func X

func X(x int) Vec

X returns Vec{X: x}.

func XY

func XY(x, y int) Vec

XY returns Vec{X: x, Y: y}.

func Y

func Y(y int) Vec

Y returns Vec{Y: y}.

func (Vec) Add

func (a Vec) Add(b Vec) Vec

Add returns a + b.

func (Vec) AddScalar

func (a Vec) AddScalar(b int) Vec

AddScalar adds b to each component.

func (Vec) Raw

func (a Vec) Raw() v2isdf.Vec

Raw returns the underlying sdfx v2i.Vec.

func (Vec) SubScalar

func (a Vec) SubScalar(b int) Vec

SubScalar subtracts b from each component.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL