DPB1Class · Utilities and settings

MathEx

Provides math ex data and the operations listed below. Related types link to the values this API consumes or returns.

Namespace: DreamPoeBot.Loki.Common

public static class MathExView DPB2 version →

Members and overloads

18 results

CalculatePointFrom

MethodLink ↗
public static Vector3 MathEx.CalculatePointFrom(Vector3 myLoc, Vector3 targetLoc, float pointDistanceToTarget)

Calculates point from using the supplied arguments.

myLocVector3
Specifies my loc.
targetLocVector3
Specifies target loc.
pointDistanceToTargetfloat
Specifies point distance to target.

Returns: The Vector3 result.

Clamp

MethodLink ↗
public static float MathEx.Clamp(float min, float max, float value)

Executes the clamp operation with the supplied arguments.

minfloat
Specifies min.
maxfloat
Specifies max.
valuefloat
Specifies value.

Returns: The float result.

Distance

MethodLink ↗
public static float MathEx.Distance(Vector3 point, LineSegment line)

Executes the distance operation with the supplied arguments.

pointVector3
Specifies point.
lineLineSegment
Specifies line.

Returns: The float result.

Distance

MethodLink ↗
public static float MathEx.Distance(ref Vector3 point, ref LineSegment line)

Executes the distance operation with the supplied arguments.

pointVector3
Supplies and may update point.
lineLineSegment
Supplies and may update line.

Returns: The float result.

DistanceSqr

MethodLink ↗
public static float MathEx.DistanceSqr(Vector3 point, LineSegment line)

Executes the distance sqr operation with the supplied arguments.

pointVector3
Specifies point.
lineLineSegment
Specifies line.

Returns: The float result.

DistanceSqr

MethodLink ↗
public static float MathEx.DistanceSqr(ref Vector3 point, ref LineSegment line)

Executes the distance sqr operation with the supplied arguments.

pointVector3
Supplies and may update point.
lineLineSegment
Supplies and may update line.

Returns: The float result.

GenerateRandomNormalDistributed

MethodLink ↗
public static double MathEx.GenerateRandomNormalDistributed(double min, double max, bool isInteger = false)

Generates a random number from a normal distribution within specified bounds.

mindouble
The minimum value (inclusive) of the desired range.
maxdouble
The maximum value (inclusive) of the desired range.
isIntegerbool
Not read by this overload in the reviewed source. Do not rely on this argument to change its behavior.

Returns: A random number from the normal distribution within the specified range.

GetAmount

MethodLink ↗
public static float MathEx.GetAmount(float min, float max, float value)

Returns amount using the supplied arguments.

minfloat
Specifies min.
maxfloat
Specifies max.
valuefloat
Specifies value.

Returns: The float result.

GetPercentage

MethodLink ↗
public static float MathEx.GetPercentage(float current, float max, bool isHundredHigh = true)

Returns percentage using the supplied arguments.

currentfloat
Specifies current.
maxfloat
Specifies max.
isHundredHighbool
Specifies is hundred high. Optional; the default is shown in the signature.

Returns: The float result.

GetPointAt

MethodLink ↗
public static Vector3 MathEx.GetPointAt(Vector3 from, float distance, float rotationRadians)

Returns point at using the supplied arguments.

fromVector3
Specifies from.
distancefloat
Specifies distance.
rotationRadiansfloat
Specifies rotation radians.

Returns: The Vector3 result.

IntersectsPath

MethodLink ↗
public static bool MathEx.IntersectsPath(Vector2i target, float radius, Vector2i start, Vector2i destination)

Executes the intersects path operation with the supplied arguments.

targetVector2i
Specifies target.
radiusfloat
Specifies radius.
startVector2i
Specifies start.
destinationVector2i
Specifies destination.

Returns: A Boolean result. The member description explains the condition being checked.

IntersectsPath

MethodLink ↗
public static bool MathEx.IntersectsPath(Vector3 target, float radius, Vector3 start, Vector3 destination)

Executes the intersects path operation with the supplied arguments.

targetVector3
Specifies target.
radiusfloat
Specifies radius.
startVector3
Specifies start.
destinationVector3
Specifies destination.

Returns: A Boolean result. The member description explains the condition being checked.

InverseLerp

MethodLink ↗
public static float MathEx.InverseLerp(float min, float max, float amount)

Executes the inverse lerp operation with the supplied arguments.

minfloat
Specifies min.
maxfloat
Specifies max.
amountfloat
Specifies amount.

Returns: The float result.

Lerp

MethodLink ↗
public static float MathEx.Lerp(float min, float max, float amount)

Executes the lerp operation with the supplied arguments.

minfloat
Specifies min.
maxfloat
Specifies max.
amountfloat
Specifies amount.

Returns: The float result.

Random

MethodLink ↗
public static double MathEx.Random(double min, double max)

Executes the random operation with the supplied arguments.

mindouble
Specifies min.
maxdouble
Specifies max.

Returns: The double result.

ToDegrees

MethodLink ↗
public static float MathEx.ToDegrees(float radians)

Executes the to degrees operation with the supplied arguments.

radiansfloat
Specifies radians.

Returns: The float result.

ToRadians

MethodLink ↗
public static float MathEx.ToRadians(float degrees)

Executes the to radians operation with the supplied arguments.

degreesfloat
Specifies degrees.

Returns: The float result.

WrapAngle

MethodLink ↗
public static float MathEx.WrapAngle(float radian)

Executes the wrap angle operation with the supplied arguments.

radianfloat
Specifies radian.

Returns: The float result.

DPB1 0.3.29.47 · Reference reviewed 2026-10-02. Descriptions use source summaries where available, otherwise concise signature-based descriptions. Examples illustrate usage; they are not a live-game test.