Show / Hide Table of Contents

Namespace Eco.Shared.Math

Classes

AreaDiminVal

Axis

AxisExtensions

AxisFlags

Diagonals

DiminVal

DiminVal.FalloffType

Direction

Direction2D

DirectionAxis

DirectionAxisFlags

DirectionAxisHorizontal

DirectionExtensions

DirectionExtensions.CubeNeighbor

Directions

DoubleExtensions

EcoTextLimit

EcoTextLimit allows for limiting text length in Eco with respect to whether or not the text contains tags. Max is used for text without tags, while MaxWithTags is used for text with tags.

FloatExtensions

HorzDir

HorzDirNone

IntExtensions

IntExtensions.IterationInRange

Creates enumerator which enumerates all values contained in range defined by "wrappedStart" and "wrappedEnd". Wrap(Int32, Int32) These values enclosed in wrapping range [0, wrappedTo), so it may create situation where "wrappedStart" greater than "wrappedEnd" because of overlapping start or end bound.

I.e. for wrapping range [0, 100): [-50, 10) => [50, 10), [50, 120) => [50, 20)

In this case we have to iterate over two ranges: [wrappedStart, wrappedTo) and [0, wrappedEnd). If wrappedStart less or equal to wrappedEnd then we go to standard iteration over [wrappedStart, wrappedEnd).

IntExtensions.IterationInRange.Enumerator

This struct is allocation free and allows to iterate through wrapped range. By example to go in range 0-10 from 7 to 3. It will return 7, 8, 9, 0, 1, 2

IntRange

Range bounded by int numbers. Alternative to System.Range without at end indexes support. With System.Range you have to know length of sequence for ^1 like indices and so can't calculate Length of range.

Matrix2x2i

Simple 2x2 integer matrix.

Octant

PackedChunkPosition

Packed chunk position. Useful when you need to use chunk position as lookup key (i.e. in Dictionary) for faster checks and compact storage.

Quaternion

Range

Ray

Rect

SVector3

Vector2

Vector2i

Vector3Extensions

Extension methods for System.Numerics.Vector3.

Vector3i

Vector3iExtensions

Extension methods for Vector3i.

Vector3Utils

Helper methods for System.Numerics.Vector3. Server now remaps System.Numerics.Vector3 to UnityEngine.Vector3 using Fody. More information in the Eco.Fody project Fody.md

VectorPacker3Int

Vector packing helper. Packs a 3 int vector into single int value.

VectorUtils

WorldArea

WorldPosition2i

WorldPosition3i

WorldRange

WrappedPosition3

Represents a WrappedWorldPosition3 variant in which y limitiations isn't applied, this is meant for objects movements around the world which isn't limited by y block bounds.

WrappedPosition3Extensions

Extension methods for WrappedPosition3.

WrappedPosition3i

Represents a WrappedWorldPosition3i variant in which y limitiations isn't applied, this is meant for objects movements around the world which isn't limited by y block bounds.

WrappedWorldPosition3

Represents wrapped world position which doesn't require any further conversions. It prevents multiple checks everywhere for position to be actually wrapped or multiple conversions for same data, this is limited in y if you need y to not limited to the block bounds use WrappedPosition3 instead.

WrappedWorldPosition3Extensions

Extension methods for WrappedWorldPosition3.

WrappedWorldPosition3i

Represents wrapped world position which doesn't require any further conversions. It prevents multiple checks everywhere for position to be actually wrapped or multiple conversions for same data. Comparing to WorldPosition3i it isn't packed, so doesn't require extra packing/unpacking operations and also readonly what allows to apply some optimizations and makes it thread-safe. This is limited in Y along with XZ wrapping, if you are looking for Position without y limitation use WrappedPosition3i

☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾