tModLoader v2024.10
A mod to make and play Terraria mods
Utils Member List

This is the complete list of members for Utils, including all inherited members.

AngleFrom(this Vector2 Origin, Vector2 Target) (defined in Utils)Utilsstatic
AngleLerp(this float curAngle, float targetAngle, float amount) (defined in Utils)Utilsstatic
AngleTo(this Vector2 Origin, Vector2 Target) (defined in Utils)Utilsstatic
AngleTowards(this float curAngle, float targetAngle, float maxChange) (defined in Utils)Utilsstatic
Between(this Vector2 vec, Vector2 minimum, Vector2 maximum) (defined in Utils)Utilsstatic
Bottom(this Rectangle r) (defined in Utils)Utilsstatic
BottomLeft(this Rectangle r) (defined in Utils)Utilsstatic
BottomRight(this Rectangle r) (defined in Utils)Utilsstatic
Center(this Rectangle r) (defined in Utils)Utilsstatic
CenteredRectangle(Vector2 center, Vector2 size) (defined in Utils)Utilsstatic
charLengths (defined in Utils)Utilsstatic
Clamp< T >(T value, T min, T max) (defined in Utils)Utilsstatic
ClampWithinWorld(ref int minX, ref int minY, ref int maxX, ref int maxY, bool lastValuesInclusiveToIteration=false, int fluffX=0, int fluffY=0) (defined in Utils)Utilsstatic
ClosestPointInRect(this Rectangle r, Vector2 point) (defined in Utils)Utilsstatic
ClosestPointOnLine(this Vector2 P, Vector2 A, Vector2 B)Utilsstatic
CoinsCombineStacks(out bool overFlowing, params long[] coinCounts) (defined in Utils)Utilsstatic
CoinsCount(out bool overFlowing, Item[] inv, params int[] ignoreSlots) (defined in Utils)Utilsstatic
CoinsSplit(long count)Utilsstatic
ColorLerp_BlackToWhite(float percent) (defined in Utils)Utilsstatic
ColorLerpMethod(float percent) (defined in Utils)Utils
ConvertMonoArgsToDotNet(string[] brokenArgs) (defined in Utils)Utilsstatic
Count< T >(this T[] arr, T value) (defined in Utils)Utilsstatic
deepCompare(this int[] firstArray, int[] secondArray) (defined in Utils)Utilsstatic
DirectionFrom(this Vector2 Origin, Vector2 Target) (defined in Utils)Utilsstatic
DirectionTo(this Vector2 Origin, Vector2 Target) (defined in Utils)Utilsstatic
Distance(this Rectangle r, Vector2 point) (defined in Utils)Utilsstatic
Distance(this Vector2 Origin, Vector2 Target) (defined in Utils)Utilsstatic
DistanceSQ(this Vector2 Origin, Vector2 Target) (defined in Utils)Utilsstatic
DoesFitInCone(Vector2 point, Vector2 coneCenter, float coneLength, float coneRotation, float maximumAngle) (defined in Utils)Utilsstatic
DrawBorderString(SpriteBatch sb, string text, Vector2 pos, Color color, float scale=1f, float anchorx=0f, float anchory=0f, int maxCharactersDisplayed=-1) (defined in Utils)Utilsstatic
DrawBorderStringBig(SpriteBatch spriteBatch, string text, Vector2 pos, Color color, float scale=1f, float anchorx=0f, float anchory=0f, int maxCharactersDisplayed=-1) (defined in Utils)Utilsstatic
DrawBorderStringFourWay(SpriteBatch sb, DynamicSpriteFont font, string text, float x, float y, Color textColor, Color borderColor, Vector2 origin, float scale=1f) (defined in Utils)Utilsstatic
DrawCursorSingle(SpriteBatch sb, Color color, float rot=float.NaN, float scale=1f, Vector2 manualPosition=default(Vector2), int cursorSlot=0, int specialMode=0) (defined in Utils)Utilsstatic
DrawInvBG(SpriteBatch sb, Rectangle R, Color c=default(Color)) (defined in Utils)Utilsstatic
DrawInvBG(SpriteBatch sb, float x, float y, float w, float h, Color c=default(Color)) (defined in Utils)Utilsstatic
DrawInvBG(SpriteBatch sb, int x, int y, int w, int h, Color c=default(Color)) (defined in Utils)Utilsstatic
DrawLaser(SpriteBatch sb, Texture2D tex, Vector2 start, Vector2 end, Vector2 scale, LaserLineFraming framing) (defined in Utils)Utilsstatic
DrawLine(SpriteBatch spriteBatch, Point start, Point end, Color color) (defined in Utils)Utilsstatic
DrawLine(SpriteBatch spriteBatch, Vector2 start, Vector2 end, Color color) (defined in Utils)Utilsstatic
DrawLine(SpriteBatch spriteBatch, Vector2 start, Vector2 end, Color colorStart, Color colorEnd, float width) (defined in Utils)Utilsstatic
DrawPanel(Texture2D texture, int edgeWidth, int edgeShove, SpriteBatch spriteBatch, Vector2 position, float width, Color color) (defined in Utils)Utilsstatic
DrawRect(SpriteBatch spriteBatch, Rectangle rect, Color color) (defined in Utils)Utilsstatic
DrawRect(SpriteBatch spriteBatch, Vector2 start, Vector2 end, Color color) (defined in Utils)Utilsstatic
DrawRect(SpriteBatch spriteBatch, Vector2 topLeft, Vector2 topRight, Vector2 bottomRight, Vector2 bottomLeft, Color color) (defined in Utils)Utilsstatic
DrawRectangle(SpriteBatch sb, Vector2 start, Vector2 end, Color colorStart, Color colorEnd, float width) (defined in Utils)Utilsstatic
DrawRectForTilesInWorld(SpriteBatch spriteBatch, Rectangle rect, Color color) (defined in Utils)Utilsstatic
DrawRectForTilesInWorld(SpriteBatch spriteBatch, Point start, Point end, Color color) (defined in Utils)Utilsstatic
DrawSettings2Panel(SpriteBatch spriteBatch, Vector2 position, float width, Color color) (defined in Utils)Utilsstatic
DrawSettingsPanel(SpriteBatch spriteBatch, Vector2 position, float width, Color color) (defined in Utils)Utilsstatic
DrawSplicedPanel(SpriteBatch sb, Texture2D texture, int x, int y, int w, int h, int leftEnd, int rightEnd, int topEnd, int bottomEnd, Color c) (defined in Utils)Utilsstatic
FactorAcceleration(Vector2 currentVelocity, float timeToInterception, Vector2 descendOfProjectile, int framesOfLenience) (defined in Utils)Utilsstatic
FloatIntersect(float r1StartX, float r1StartY, float r1Width, float r1Height, float r2StartX, float r2StartY, float r2Width, float r2Height) (defined in Utils)Utilsstatic
Floor(this Vector2 vec) (defined in Utils)Utilsstatic
FormatWith(string original, object obj) (defined in Utils)Utilsstatic
Frame(this Asset< Texture2D > tex, int horizontalFrames=1, int verticalFrames=1, int frameX=0, int frameY=0, int sizeOffsetX=0, int sizeOffsetY=0)Utilsstatic
Frame(this Texture2D tex, int horizontalFrames=1, int verticalFrames=1, int frameX=0, int frameY=0, int sizeOffsetX=0, int sizeOffsetY=0)Utilsstatic
GetChaseResults(Vector2 chaserPosition, float chaserSpeed, Vector2 runnerPosition, Vector2 runnerVelocity) (defined in Utils)Utilsstatic
GetDayTimeAs24FloatStartingFromMidnight()Utilsstatic
GetDayTimeAsDirectionIn24HClock() (defined in Utils)Utilsstatic
GetDayTimeAsDirectionIn24HClock(float timeFrom0To24) (defined in Utils)Utilsstatic
GetLerpValue(float from, float to, float t, bool clamped=false) (defined in Utils)Utilsstatic
GetLerpValue(double from, double to, double t, bool clamped=false) (defined in Utils)Utilsstatic
GetTrueIndexes(this bool[] array) (defined in Utils)Utilsstatic
GetTrueIndexes(params bool[][] arrays) (defined in Utils)Utilsstatic
HasNaNs(this Vector2 vec) (defined in Utils)Utilsstatic
Height(this Asset< Texture2D > asset) (defined in Utils)Utilsstatic
Hex3(this Color color) (defined in Utils)Utilsstatic
Hex4(this Color color) (defined in Utils)Utilsstatic
IndexInRange< T >(this T[] t, int index) (defined in Utils)Utilsstatic
IndexInRange< T >(this List< T > t, int index) (defined in Utils)Utilsstatic
IntersectsConeFastInaccurate(this Rectangle targetRect, Vector2 coneCenter, float coneLength, float coneRotation, float maximumAngle) (defined in Utils)Utilsstatic
IntersectsConeSlowMoreAccurate(this Rectangle targetRect, Vector2 coneCenter, float coneLength, float coneRotation, float maximumAngle) (defined in Utils)Utilsstatic
IsPowerOfTwo(int x) (defined in Utils)Utilsstatic
LaserLineFraming(int stage, Vector2 currentPosition, float distanceLeft, Rectangle lastFrame, out float distanceCovered, out Rectangle frame, out Vector2 origin, out Color color) (defined in Utils)Utils
Left(this Rectangle r) (defined in Utils)Utilsstatic
Lerp(double value1, double value2, double amount) (defined in Utils)Utilsstatic
LineRectangleDistance(Rectangle rect, Vector2 lineStart, Vector2 lineEnd) (defined in Utils)Utilsstatic
LogAndChatAndConsoleInfoMessage(string message) (defined in Utils)Utilsstatic
LogAndConsoleErrorMessage(string message) (defined in Utils)Utilsstatic
LogAndConsoleInfoMessage(string message) (defined in Utils)Utilsstatic
LogAndConsoleInfoMessageFormat(string format, params object[] args) (defined in Utils)Utilsstatic
MajorMinor(this Version v) (defined in Utils)Utilsstatic
MajorMinorBuild(this Version v) (defined in Utils)Utilsstatic
MapArray< T, R >(T[] array, Func< T, R > mapper) (defined in Utils)Utilsstatic
Max< T >(params T[] args) (defined in Utils)Utilsstatic
MaxCoins (defined in Utils)Utilsstatic
Modified(this Rectangle r, int x, int y, int w, int h) (defined in Utils)Utilsstatic
ModulusPositive(this int myInteger, int modulusNumber) (defined in Utils)Utilsstatic
MoveTowards(this Vector2 currentPosition, Vector2 targetPosition, float maxAmountAllowedToMove) (defined in Utils)Utilsstatic
MultiLerp(float percent, params float[] floats)Utilsstatic
MultiplyRGB(this Color firstColor, Color secondColor) (defined in Utils)Utilsstatic
MultiplyRGBA(this Color firstColor, Color secondColor) (defined in Utils)Utilsstatic
Next(this UnifiedRandom random, IntRange range) (defined in Utils)Utilsstatic
Next< T >(this UnifiedRandom r, T[] array)Utilsstatic
Next< T >(this UnifiedRandom r, IList< T > list)Utilsstatic
NextBool(this UnifiedRandom r)Utilsstatic
NextBool(this UnifiedRandom r, int consequent)Utilsstatic
NextBool(this UnifiedRandom r, int antecedent, int consequent)Utilsstatic
NextEnum< T >(this T src) (defined in Utils)Utilsstatic
NextFloat(this UnifiedRandom r)Utilsstatic
NextFloat(this UnifiedRandom random, FloatRange range) (defined in Utils)Utilsstatic
NextFloat(this UnifiedRandom r, float maxValue)Utilsstatic
NextFloat(this UnifiedRandom r, float minValue, float maxValue)Utilsstatic
NextFloatDirection(this UnifiedRandom r) (defined in Utils)Utilsstatic
NextFromCollection< T >(this UnifiedRandom random, List< T > objs) (defined in Utils)Utilsstatic
NextFromList< T >(this UnifiedRandom random, params T[] objs) (defined in Utils)Utilsstatic
NextVector2Circular(this UnifiedRandom r, float circleHalfWidth, float circleHalfHeight) (defined in Utils)Utilsstatic
NextVector2CircularEdge(this UnifiedRandom r, float circleHalfWidth, float circleHalfHeight) (defined in Utils)Utilsstatic
NextVector2FromRectangle(this UnifiedRandom r, Rectangle rect) (defined in Utils)Utilsstatic
NextVector2Square(this UnifiedRandom r, float min, float max) (defined in Utils)Utilsstatic
NextVector2Unit(this UnifiedRandom r, float startRotation=0f, float rotationRange=(float) Math.PI *2f) (defined in Utils)Utilsstatic
OffsetSize(this Rectangle rect, int xSize, int ySize) (defined in Utils)Utilsstatic
OpenFolder(string folderPath) (defined in Utils)Utilsstatic
OpenToURL(string url) (defined in Utils)Utilsstatic
OriginFlip(this Rectangle rect, Vector2 origin, SpriteEffects effects) (defined in Utils)Utilsstatic
ParseArguements(string[] args) (defined in Utils)Utilsstatic
PingPongFrom01To010(float value)Utilsstatic
PlotLine(Point16 p0, Point16 p1, TileActionAttempt plot, bool jump=true) (defined in Utils)Utilsstatic
PlotLine(Point p0, Point p1, TileActionAttempt plot, bool jump=true) (defined in Utils)Utilsstatic
PlotTileArea(int x, int y, TileActionAttempt plot) (defined in Utils)Utilsstatic
PlotTileLine(Vector2 start, Vector2 end, float width, TileActionAttempt plot) (defined in Utils)Utilsstatic
PlotTileLine(Vector2D start, Vector2D end, double width, TileActionAttempt plot) (defined in Utils)Utilsstatic
PlotTileTale(Vector2D start, Vector2D end, double width, TileActionAttempt plot) (defined in Utils)Utilsstatic
PoofOfSmoke(Vector2 position) (defined in Utils)Utilsstatic
PressingControl(this KeyboardState kb) (defined in Utils)Utilsstatic
PressingShift(this KeyboardState kb) (defined in Utils)Utilsstatic
PrettifyPercentDisplay(float percent, string originalFormat) (defined in Utils)Utilsstatic
PreviousEnum< T >(this T src) (defined in Utils)Utilsstatic
RandomConsecutive(double random, int odds) (defined in Utils)Utilsstatic
RandomFloat(ref ulong seed) (defined in Utils)Utilsstatic
RandomInt(ref ulong seed, int max) (defined in Utils)Utilsstatic
RandomInt(ref ulong seed, int min, int max) (defined in Utils)Utilsstatic
RandomNext(ref ulong seed, int bits) (defined in Utils)Utilsstatic
RandomNextSeed(ulong seed) (defined in Utils)Utilsstatic
RandomVector2(UnifiedRandom random, float min, float max) (defined in Utils)Utilsstatic
RandomVector2D(UnifiedRandom random, double min, double max) (defined in Utils)Utilsstatic
ReadEmbeddedResource(string path) (defined in Utils)Utilsstatic
ReadPackedVector2(this BinaryReader bb) (defined in Utils)Utilsstatic
ReadRGB(this BinaryReader bb) (defined in Utils)Utilsstatic
ReadVector2(this BinaryReader bb) (defined in Utils)Utilsstatic
ReceiveBitArray(int BitArrLength, BinaryReader reader)Utilsstatic
RectangleLineCollision(Vector2 rectTopLeft, Vector2 rectBottomRight, Vector2 lineStart, Vector2 lineEnd) (defined in Utils)Utilsstatic
Remap(float fromValue, float fromMin, float fromMax, float toMin, float toMax, bool clamped=true) (defined in Utils)Utilsstatic
Repeat(int value, int length) (defined in Utils)Utilsstatic
Right(this Rectangle r) (defined in Utils)Utilsstatic
RotatedBy(this Vector2 spinningpoint, double radians, Vector2 center=default(Vector2)) (defined in Utils)Utilsstatic
RotatedBy(this Vector2D spinningpoint, double radians, Vector2D center=default(Vector2D)) (defined in Utils)Utilsstatic
RotatedByRandom(this Vector2 spinninpoint, double maxRadians) (defined in Utils)Utilsstatic
RotateRandom(this Vector2 spinninpoint, double maxRadians) (defined in Utils)Utilsstatic
rotateTowards(Vector2 currentPosition, Vector2 currentVelocity, Vector2 targetPosition, float maxChange) (defined in Utils)Utilsstatic
Round(Vector2 input) (defined in Utils)Utilsstatic
SafeNormalize(this Vector2 v, Vector2 defaultValue)Utilsstatic
SelectRandom< T >(UnifiedRandom random, params T[] choices) (defined in Utils)Utilsstatic
SendBitArray(BitArray arr, BinaryWriter writer)Utilsstatic
ShowFancyErrorMessage(string message, int returnToMenu, UIState returnToState=null) (defined in Utils)Utilsstatic
Size(this Asset< Texture2D > tex) (defined in Utils)Utilsstatic
Size(this Texture2D tex) (defined in Utils)Utilsstatic
Size(this Rectangle r) (defined in Utils)Utilsstatic
SmoothStep(float min, float max, float x) (defined in Utils)Utilsstatic
SmoothStep(double min, double max, double x) (defined in Utils)Utilsstatic
SolveQuadratic(float a, float b, float c, out float result1, out float result2) (defined in Utils)Utilsstatic
Swap< T >(ref T t1, ref T t2) (defined in Utils)Utilsstatic
TileActionAttempt(int x, int y) (defined in Utils)Utils
ToByteArray(this string str) (defined in Utils)Utilsstatic
ToDirectionInt(this bool value)Utilsstatic
ToInt(this bool value)Utilsstatic
Top(this Rectangle r) (defined in Utils)Utilsstatic
TopLeft(this Rectangle r) (defined in Utils)Utilsstatic
ToPoint(this Vector2 v) (defined in Utils)Utilsstatic
ToPoint(this Vector2D v) (defined in Utils)Utilsstatic
ToPoint(this Point16 p) (defined in Utils)Utilsstatic
ToPoint16(this Vector2 v)Utilsstatic
TopRight(this Rectangle r) (defined in Utils)Utilsstatic
ToRotation(this Vector2 v) (defined in Utils)Utilsstatic
ToRotationVector2(this float f) (defined in Utils)Utilsstatic
ToScreenPosition(this Vector2 worldPosition) (defined in Utils)Utilsstatic
ToTileCoordinates(this Vector2 vec)Utilsstatic
ToTileCoordinates(this Vector2D vec) (defined in Utils)Utilsstatic
ToTileCoordinates16(this Vector2 vec)Utilsstatic
ToTileCoordinates16(this Vector2D vec) (defined in Utils)Utilsstatic
ToVector2(this Point p) (defined in Utils)Utilsstatic
ToVector2(this Point16 p) (defined in Utils)Utilsstatic
ToVector2D(this Point p) (defined in Utils)Utilsstatic
ToVector2D(this Point16 p) (defined in Utils)Utilsstatic
ToVector2D(this Vector2 v) (defined in Utils)Utilsstatic
ToWorldCoordinates(this Point p, float autoAddX=8f, float autoAddY=8f)Utilsstatic
ToWorldCoordinates(this Point16 p, float autoAddX=8f, float autoAddY=8f)Utilsstatic
ToWorldCoordinates(this Point p, Vector2 autoAddXY)Utilsstatic
ToWorldCoordinates(this Point16 p, Vector2 autoAddXY)Utilsstatic
ToWorldCoordinates(this Vector2 v, float autoAddX=8f, float autoAddY=8f)Utilsstatic
ToWorldCoordinates(this Vector2 v, Vector2 autoAddXY)Utilsstatic
TrimTextIfNeeded(ref string text, DynamicSpriteFont font, float scale, float maxWidth) (defined in Utils)Utilsstatic
TryCreatingDirectory(string folderPath) (defined in Utils)Utilsstatic
Turn01ToCyclic010(float value)Utilsstatic
UnclampedSmoothStep(float min, float max, float x) (defined in Utils)Utilsstatic
UnclampedSmoothStep(double min, double max, double x) (defined in Utils)Utilsstatic
UnixTimeStampToDateTime(long unixTimeStamp) (defined in Utils)Utilsstatic
Vector2FromElipse(Vector2 angleVector, Vector2 elipseSizes) (defined in Utils)Utilsstatic
Width(this Asset< Texture2D > asset) (defined in Utils)Utilsstatic
WithinRange(this Vector2 Origin, Vector2 Target, float MaxRange)Utilsstatic
WordwrapString(string text, DynamicSpriteFont font, int maxWidth, int maxLines, out int lineAmount) (defined in Utils)Utilsstatic
WordwrapStringSmart(string text, Color c, DynamicSpriteFont font, int maxWidth, int maxLines) (defined in Utils)Utilsstatic
WrappedLerp(float value1, float value2, float percent) (defined in Utils)Utilsstatic
WritePackedVector2(this BinaryWriter bb, Vector2 v) (defined in Utils)Utilsstatic
WriteRGB(this BinaryWriter bb, Color c) (defined in Utils)Utilsstatic
WriteVector2(this BinaryWriter bb, Vector2 v) (defined in Utils)Utilsstatic
XY(this Vector4 vec) (defined in Utils)Utilsstatic
XZW(this Vector4 vec) (defined in Utils)Utilsstatic
YZW(this Vector4 vec) (defined in Utils)Utilsstatic
ZW(this Vector4 vec) (defined in Utils)Utilsstatic