v2i

package
v0.0.0-...-4203c70 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: MIT Imports: 0 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vec

type Vec struct {
	X, Y int
}

Vec is a 2D integer vector.

func (Vec) Add

func (a Vec) Add(b Vec) Vec

Add adds two vectors. Return v = a + b.

func (Vec) AddScalar

func (a Vec) AddScalar(b int) Vec

AddScalar adds a scalar to each component of the vector.

func (Vec) SubScalar

func (a Vec) SubScalar(b int) Vec

SubScalar subtracts a scalar from each component of the vector.

Jump to

Keyboard shortcuts

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