Table of Contents

Class Vec4i

Namespace
Vintagestory.API.MathTools
Assembly
VintagestoryAPI.dll

Represents a vector of 4 ints. Go bug Tyron if you need more utility methods in this class.

public class Vec4i : IEquatable<Vec4i>
Inheritance
Vec4i
Implements
Derived
Inherited Members

Constructors

Vec4i()

public Vec4i()

Vec4i(int, int, int, int)

public Vec4i(int x, int y, int z, int w)

Parameters

x int
y int
z int
w int

Vec4i(BlockPos, int)

public Vec4i(BlockPos pos, int w)

Parameters

pos BlockPos
w int

Fields

W

public int W

Field Value

int

X

public int X

Field Value

int

Y

public int Y

Field Value

int

Z

public int Z

Field Value

int

Methods

Equals(Vec4i)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Vec4i other)

Parameters

other Vec4i

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

HorDistanceSqTo(double, double)

Returns the squared Euclidean horizontal distance to between this and given position

public float HorDistanceSqTo(double x, double z)

Parameters

x double
z double

Returns

float