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 MathEx
Reference: DPB1 0.3.29.56Compare the DPB2 reference → Check signatures and usage notes separately; a matching type is not a compatibility guarantee.

Members and overloads

18 declared here

CalculatePointFrom

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

Calculates point from using the supplied arguments.

Return type: Vector3
Explore Vector3 → members & methods

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

Parameters

myLoc

Specifies my loc.

targetLoc

Specifies target loc.

pointDistanceToTarget
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies point distance to target.

Returns: The Vector3 result.

Clamp

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

Calls Clamp on MathEx with min, max, value and returns float. Open the return contract below before using the result.

Return type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

min
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies min.

max
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies max.

value
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies value.

Returns: The float result.

Distance

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

Calls Distance on MathEx with point, line and returns float. Open the return contract below before using the result.

Return type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

point

Specifies point.

line

Specifies line.

Returns: The float result.

Distance

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

Calls Distance on MathEx with point, line and returns float. Open the return contract below before using the result.

Return type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

point

Supplies and may update point.

line

Supplies and may update line.

Returns: The float result.

DistanceSqr

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

Calls DistanceSqr on MathEx with point, line and returns float. Open the return contract below before using the result.

Return type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

point

Specifies point.

line

Specifies line.

Returns: The float result.

DistanceSqr

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

Calls DistanceSqr on MathEx with point, line and returns float. Open the return contract below before using the result.

Return type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

point

Supplies and may update point.

line

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.

Return type: doubleNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

min
Parameter type: doubleNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

The minimum value (inclusive) of the desired range.

max
Parameter type: doubleNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

The maximum value (inclusive) of the desired range.

isInteger
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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)

Calls GetAmount on MathEx with min, max, value and returns float. Open the return contract below before using the result.

Return type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

min
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies min.

max
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies max.

value
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies value.

Returns: The float result.

GetPercentage

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

Calls GetPercentage on MathEx with current, max, isHundredHigh and returns float. Open the return contract below before using the result.

Return type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

current
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies current.

max
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies max.

isHundredHigh
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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)

Calls GetPointAt on MathEx with from, distance, rotationRadians and returns Vector3. Open the return contract below before using the result.

Return type: Vector3
Explore Vector3 → members & methods

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

Parameters

from

Specifies from.

distance
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies distance.

rotationRadians
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies rotation radians.

Returns: The Vector3 result.

IntersectsPath

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

Calls IntersectsPath on MathEx with target, radius, start, destination and returns bool. Open the return contract below before using the result.

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

target

Specifies target.

radius
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies radius.

start

Specifies start.

destination

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)

Calls IntersectsPath on MathEx with target, radius, start, destination and returns bool. Open the return contract below before using the result.

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

target

Specifies target.

radius
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies radius.

start

Specifies start.

destination

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)

Calls InverseLerp on MathEx with min, max, amount and returns float. Open the return contract below before using the result.

Return type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

min
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies min.

max
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies max.

amount
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies amount.

Returns: The float result.

Lerp

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

Calls Lerp on MathEx with min, max, amount and returns float. Open the return contract below before using the result.

Return type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

min
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies min.

max
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies max.

amount
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies amount.

Returns: The float result.

Random

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

Calls Random on MathEx with min, max and returns double. Open the return contract below before using the result.

Return type: doubleNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

min
Parameter type: doubleNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies min.

max
Parameter type: doubleNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies max.

Returns: The double result.

ToDegrees

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

Calls ToDegrees on MathEx with radians and returns float. Open the return contract below before using the result.

Return type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

radians
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies radians.

Returns: The float result.

ToRadians

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

Calls ToRadians on MathEx with degrees and returns float. Open the return contract below before using the result.

Return type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

degrees
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies degrees.

Returns: The float result.

WrapAngle

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

Calls WrapAngle on MathEx with radian and returns float. Open the return contract below before using the result.

Return type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

radian
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies radian.

Returns: The float result.

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