Class ExM
A repository for generic expression mathematics.
Most of the math library is implemented in the DMath classes beginning with ExM.
Inheritance
System.Object
ExM
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: cs.temp.dll.dll
Syntax
Properties
Declaration
public static TEx<int> FrameNumber { get; }
Property Value
Type |
Description |
TEx<System.Int32> |
|
inst
Declaration
public static Ex inst { get; }
Property Value
Methods
__Combine(Int32, Int32, Int32)
Declaration
public static int __Combine(int x, int y, int mod = 1024)
Parameters
Type |
Name |
Description |
System.Int32 |
x |
|
System.Int32 |
y |
|
System.Int32 |
mod |
|
Returns
Type |
Description |
System.Int32 |
|
_constNamedTimer(String)
Declaration
public static Func<TExArgCtx, TEx<ETime.Timer>> _constNamedTimer(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type |
Description |
System.Func<TExArgCtx, TEx<ETime.Timer>> |
|
Abs(tfloat)
Get the absolute value of a number.
Declaration
public static tfloat Abs(tfloat var)
Parameters
Type |
Name |
Description |
tfloat |
var |
Target
|
Returns
ACos(tfloat)
Declaration
public static tfloat ACos(tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
Returns
ACosR(tfloat)
Get the arccosine in radians of a number.
Declaration
public static tfloat ACosR(tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
Returns
Add<T>(TEx<T>, TEx<T>)
Declaration
public static TEx<T> Add<T>(TEx<T> x, TEx<T> y)
Parameters
Type |
Name |
Description |
TEx<T> |
x |
|
TEx<T> |
y |
|
Returns
Type Parameters
AddA(trv2, tfloat)
Add to the angle of an RV2.
Declaration
public static trv2 AddA(trv2 rv2, tfloat ang)
Parameters
Type |
Name |
Description |
trv2 |
rv2 |
|
tfloat |
ang |
|
Returns
AddNV(trv2, tv2)
Add to the nonrotational components of an RV2.
Declaration
public static trv2 AddNV(trv2 rv2, tv2 nv)
Parameters
Type |
Name |
Description |
trv2 |
rv2 |
|
tv2 |
nv |
|
Returns
AddNVA(trv2, tv2, tfloat)
Add to the nonrotational components and angle of an RV2.
Declaration
public static trv2 AddNVA(trv2 rv2, tv2 nv, tfloat ang)
Parameters
Type |
Name |
Description |
trv2 |
rv2 |
|
tv2 |
nv |
|
tfloat |
ang |
|
Returns
AddRV(trv2, tv2)
Add to the rotational components of an RV2.
Declaration
public static trv2 AddRV(trv2 rv2, tv2 rv)
Parameters
Type |
Name |
Description |
trv2 |
rv2 |
|
tv2 |
rv |
|
Returns
AddRVA(trv2, tv3)
Add to the rotational components and angle of an RV2.
Declaration
public static trv2 AddRVA(trv2 rv2, tv3 rva)
Parameters
Type |
Name |
Description |
trv2 |
rv2 |
|
tv3 |
rva |
|
Returns
ArrayIndex<T>(TEx<T[]>, TEx<Int32>)
Array indexing operator arr[index].
Declaration
public static TEx<T> ArrayIndex<T>(TEx<T[]> arr, TEx<int> index)
Parameters
Type |
Name |
Description |
TEx<T[]> |
arr |
|
TEx<System.Int32> |
index |
|
Returns
Type Parameters
ATan(tv2)
Return the angle in degrees whose tangent is v2.y/v2.x.
Declaration
public static tfloat ATan(tv2 f)
Parameters
Type |
Name |
Description |
tv2 |
f |
|
Returns
ATan2(tfloat, tfloat)
Return the angle in degrees whose tangent is y/x.
Declaration
public static tfloat ATan2(tfloat y, tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
y |
|
tfloat |
x |
|
Returns
ATanR(tv2)
Return the angle in radians whose tangent is v2.y/v2.x.
Declaration
public static tfloat ATanR(tv2 f)
Parameters
Type |
Name |
Description |
tv2 |
f |
|
Returns
ATanR2(tfloat, tfloat)
Return the angle in radians whose tangent is y/x.
Declaration
public static tfloat ATanR2(tfloat y, tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
y |
|
tfloat |
x |
|
Returns
BlockFloor(tfloat, tfloat)
= Floor(ex / block) * block
Declaration
public static tfloat BlockFloor(tfloat block, tfloat ex)
Parameters
Type |
Name |
Description |
tfloat |
block |
|
tfloat |
ex |
|
Returns
BlockRound(tfloat, tfloat)
= Round(ex / block) * block
Declaration
public static tfloat BlockRound(tfloat block, tfloat ex)
Parameters
Type |
Name |
Description |
tfloat |
block |
|
tfloat |
ex |
|
Returns
BounceX(tfloat, tv2, tv2)
Find the angle of fire such that a ray fired from the source bouncing off the wall X=W would hit the target.
Declaration
public static tfloat BounceX(tfloat w, tv2 source, tv2 target)
Parameters
Type |
Name |
Description |
tfloat |
w |
|
tv2 |
source |
|
tv2 |
target |
|
Returns
BounceY(tfloat, tv2, tv2)
Find the angle of fire such that a ray fired from the source bouncing off the wall Y=W would hit the target.
Declaration
public static tfloat BounceY(tfloat w, tv2 source, tv2 target)
Parameters
Type |
Name |
Description |
tfloat |
w |
|
tv2 |
source |
|
tv2 |
target |
|
Returns
Ceil(tfloat)
Returns the ceil of a float value.
Declaration
public static tfloat Ceil(tfloat ex)
Parameters
Type |
Name |
Description |
tfloat |
ex |
|
Returns
CFeature<T>()
Get the custom feature of type T from the instance data.
Declaration
public static TEx<T> CFeature<T>()
Returns
Type Parameters
Clamp(tfloat, tfloat, tfloat)
Clamp a value to a [min, max] range.
Declaration
public static tfloat Clamp(tfloat min, tfloat max, tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
min |
|
tfloat |
max |
|
tfloat |
x |
|
Returns
Clamp01(tfloat)
Clamp a value to the [0, 1] range.
Declaration
public static tfloat Clamp01(tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
Returns
Colliding(Func<TExArgCtx, TEx<Bullet>>)
On a complex bullet, returns true if the bullet is colliding.
Declaration
public static ExPred Colliding(Func<TExArgCtx, TEx<Bullet>> ctr)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<Bullet>> |
ctr |
|
Returns
CollidingT(Func<TExArgCtx, TEx<Bullet>>)
On a complex bullet, returns the amount of time that the bullet has been continuously colliding for.
Declaration
public static ExBPY CollidingT(Func<TExArgCtx, TEx<Bullet>> ctr)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<Bullet>> |
ctr |
|
Returns
Complement(tfloat)
Declaration
public static tfloat Complement(tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
Returns
Cos(tfloat)
The raw cosine function (period 2pi, peakheight 1).
Declaration
public static tfloat Cos(tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
Returns
CosDeg(tfloat)
The raw degree cosine function (period 360,, peakheight 1).
Declaration
public static tfloat CosDeg(tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
Returns
Cosine(tfloat, tfloat, tfloat)
Return a cosine with a custom period/amplitude.
Declaration
public static tfloat Cosine(tfloat period, tfloat peakHeight, tfloat f)
Parameters
Type |
Name |
Description |
tfloat |
period |
Cosine period
|
tfloat |
peakHeight |
Cosine peak height
|
tfloat |
f |
Target function
|
Returns
CosSin(tfloat)
Get the raw cosine and sine functions together.
Declaration
public static TEx<Vector2> CosSin(tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
Returns
Type |
Description |
TEx<Vector2> |
|
CosSinDeg(tfloat)
Get the raw degree cosine and sine functions together.
Declaration
public static TEx<Vector2> CosSinDeg(tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
Returns
Type |
Description |
TEx<Vector2> |
|
DCosine(tfloat, tfloat, tfloat)
Return the derivative of a cosine with a custom period/amplitude.
Declaration
public static tfloat DCosine(tfloat period, tfloat peakHeight, tfloat f)
Parameters
Type |
Name |
Description |
tfloat |
period |
Cosine period
|
tfloat |
peakHeight |
Cosine peak height
|
tfloat |
f |
Target function
|
Returns
Decrement(tfloat)
Declaration
public static tfloat Decrement(tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
Returns
DecrementSubtract(tfloat, tfloat)
Declaration
public static tfloat DecrementSubtract(tfloat x, tfloat y)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
tfloat |
y |
|
Returns
DegDiff(tv2, tv2)
Get the rotation required, in degrees, to rotate SOURCE to TARGET, in the range [-180,180].
Declaration
public static tfloat DegDiff(tv2 target, tv2 source)
Parameters
Type |
Name |
Description |
tv2 |
target |
|
tv2 |
source |
|
Returns
DegIntoRange(tfloat)
Move a value in the range [-540, 540] to the range [-180, 180] by adding or subtracting 360.
Declaration
public static tfloat DegIntoRange(tfloat ang_rad)
Parameters
Type |
Name |
Description |
tfloat |
ang_rad |
|
Returns
DegRad(tfloat)
Convert a number from degrees to radians.
Declaration
public static tfloat DegRad(tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
Returns
dFloor(Ex)
Declaration
public static Ex dFloor(Ex ex)
Parameters
Type |
Name |
Description |
Ex |
ex |
|
Returns
Diff(tfloat, tfloat)
Returns the nonnegative difference between two numbers.
Declaration
public static tfloat Diff(tfloat x, tfloat y)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
tfloat |
y |
|
Returns
Dist(tv2, tv2)
Get the normalized distance (square root) between two parametric equations.
Declaration
public static tfloat Dist(tv2 f1, tv2 f2)
Parameters
Type |
Name |
Description |
tv2 |
f1 |
|
tv2 |
f2 |
|
Returns
DistToWall(tv2, tv2)
Declaration
public static tfloat DistToWall(tv2 from, tv2 dir)
Parameters
Type |
Name |
Description |
tv2 |
from |
|
tv2 |
dir |
|
Returns
Div<T>(TEx<T>, tfloat)
Divide a vectype by a number. Alias: / x y
Declaration
public static TEx<T> Div<T>(TEx<T> x, tfloat y)
Parameters
Type |
Name |
Description |
TEx<T> |
x |
|
tfloat |
y |
|
Returns
Type Parameters
DivInv(tfloat, tfloat)
Divide two numbers in reverse order (the same as / y x).
Declaration
public static tfloat DivInv(tfloat x, tfloat y)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
tfloat |
y |
|
Returns
DSine(tfloat, tfloat, tfloat)
Return the derivative of a sine with a custom period/amplitude.
Declaration
public static tfloat DSine(tfloat period, tfloat peakHeight, tfloat f)
Parameters
Type |
Name |
Description |
tfloat |
period |
Sine period
|
tfloat |
peakHeight |
Sine peak height
|
tfloat |
f |
Target function
|
Returns
Exp(tfloat)
Declaration
public static tfloat Exp(tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
Returns
exP1M(Ex, Ex)
Declaration
public static Ex exP1M(Ex mod, Ex t)
Parameters
Type |
Name |
Description |
Ex |
mod |
|
Ex |
t |
|
Returns
exP2M(Ex, Ex)
Declaration
public static Ex exP2M(Ex mod, Ex t)
Parameters
Type |
Name |
Description |
Ex |
mod |
|
Ex |
t |
|
Returns
exPM(Ex, Ex, Ex)
Declaration
public static Ex exPM(Ex self, Ex children, Ex t)
Parameters
Type |
Name |
Description |
Ex |
self |
|
Ex |
children |
|
Ex |
t |
|
Returns
FDiv(tfloat, tfloat)
Divide two numbers and returns the floor.
Declaration
public static tfloat FDiv(tfloat x, tfloat y)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
tfloat |
y |
|
Returns
Floor(tfloat)
Returns the floor of a float value.
Declaration
public static tfloat Floor(tfloat ex)
Parameters
Type |
Name |
Description |
tfloat |
ex |
|
Returns
FromID(String)
Declaration
public static Func<TExArgCtx, TEx<BehaviorEntity>> FromID(string id)
Parameters
Type |
Name |
Description |
System.String |
id |
|
Returns
Type |
Description |
System.Func<TExArgCtx, TEx<BehaviorEntity>> |
|
Height(tfloat, tfloat, tfloat, tfloat)
Returns the acceleration displacement function h0 + v0*t + 0.5*g*t^2
.
Declaration
public static tfloat Height(tfloat h0, tfloat v0, tfloat g, tfloat time)
Parameters
Type |
Name |
Description |
tfloat |
h0 |
|
tfloat |
v0 |
|
tfloat |
g |
|
tfloat |
time |
|
Returns
HighCut(tfloat, tfloat)
If x's absolute value is greater than by, then return 0 instead.
Declaration
public static tfloat HighCut(tfloat by, tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
by |
|
tfloat |
x |
|
Returns
HighPass(tfloat, tfloat)
If x's absolute value is less than by, then return 0 instead.
Declaration
public static tfloat HighPass(tfloat by, tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
by |
|
tfloat |
x |
|
Returns
HPi()
Declaration
public static tfloat HPi()
Returns
HPRatio(TEx<BehaviorEntity>)
Get the HP ratio (0-1) of the BehaviorEntity.
The BEH must be an enemy, or this will cause errors.
Declaration
public static tfloat HPRatio(TEx<BehaviorEntity> beh)
Parameters
Type |
Name |
Description |
TEx<BehaviorEntity> |
beh |
|
Returns
IfPowerGTP<T>(Func<TExArgCtx, TEx<T>>)
If the player's power (floored) is strictly than the firing index,
return the child, otherwise return zero.
Declaration
public static Func<TExArgCtx, TEx<T>> IfPowerGTP<T>(Func<TExArgCtx, TEx<T>> inner)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<T>> |
inner |
|
Returns
Type |
Description |
System.Func<TExArgCtx, TEx<T>> |
|
Type Parameters
Increment(tfloat)
Declaration
public static tfloat Increment(tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
Returns
Instance()
Declaration
public static TEx<InstanceData> Instance()
Returns
Type |
Description |
TEx<InstanceData> |
|
Is1CC()
Returns true if the instance has not continued.
Declaration
public static tbool Is1CC()
Returns
LaserLastActiveT(Func<TExArgCtx, TEx<CurvedTileRenderLaser>>)
Returns the last active time of the laser. This is the first time at which the "deactivate" option
on the laser returns true. If the deactivate option does not exist or has not yet returned true,
this returns "effectively infinity".
Declaration
public static ExBPY LaserLastActiveT(Func<TExArgCtx, TEx<CurvedTileRenderLaser>> ctr)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<CurvedTileRenderLaser>> |
ctr |
|
Returns
LBEH(TEx<BehaviorEntity>)
Get the location of the BehaviorEntity.
Declaration
public static TEx<Vector2> LBEH(TEx<BehaviorEntity> beh)
Parameters
Type |
Name |
Description |
TEx<BehaviorEntity> |
beh |
|
Returns
Type |
Description |
TEx<Vector2> |
|
Let<T>(ReflectEx.Alias[], Func<TExArgCtx, TEx<T>>)
Assign local variables that can be repeatedly used without reexecution via the Reference (&) function.
Declaration
public static Func<TExArgCtx, TEx<T>> Let<T>(ReflectEx.Alias[] aliases, Func<TExArgCtx, TEx<T>> inner)
Parameters
Type |
Name |
Description |
ReflectEx.Alias[] |
aliases |
List of each variable's type, name, and assigned value (eg. f myFloat 5 + t)
|
System.Func<TExArgCtx, TEx<T>> |
inner |
Code to execute within the scope of the variables
|
Returns
Type |
Description |
System.Func<TExArgCtx, TEx<T>> |
|
Type Parameters
LetBDSL2<T, V>((String, UncompiledCode<V>)[], Func<TExArgCtx, TEx<T>>)
Assign local variables that can be repeatedly used without reexecution via the ReferenceLet (rflet) function.
Note: this is only for backwards compatibility and is superseded by block variable assignment.
Declaration
public static Func<TExArgCtx, TEx<T>> LetBDSL2<T, V>((string, UncompiledCode<V>)[] aliases, Func<TExArgCtx, TEx<T>> inner)
Parameters
Type |
Name |
Description |
System.ValueTuple<System.String, UncompiledCode<V>>[] |
aliases |
List of each variable and its assigned vector value
|
System.Func<TExArgCtx, TEx<T>> |
inner |
Code to execute within the scope of the variables
|
Returns
Type |
Description |
System.Func<TExArgCtx, TEx<T>> |
|
Type Parameters
LetFloats<T>((String, ExBPY)[], Func<TExArgCtx, TEx<T>>)
Assign local variables that can be repeatedly used without reexecution via the Reference (&) function.
Shortcut: ::
Declaration
public static Func<TExArgCtx, TEx<T>> LetFloats<T>((string, ExBPY)[] aliases, Func<TExArgCtx, TEx<T>> inner)
Parameters
Type |
Name |
Description |
System.ValueTuple<System.String, ExBPY>[] |
aliases |
List of each variable and its assigned vector value
|
System.Func<TExArgCtx, TEx<T>> |
inner |
Code to execute within the scope of the variables
|
Returns
Type |
Description |
System.Func<TExArgCtx, TEx<T>> |
|
Type Parameters
LetV2s<T>((String, ExTP)[], Func<TExArgCtx, TEx<T>>)
Assign local variables that can be repeatedly used without reexecution via the Reference (&) function.
Shortcut: ::v2
Declaration
public static Func<TExArgCtx, TEx<T>> LetV2s<T>((string, ExTP)[] aliases, Func<TExArgCtx, TEx<T>> inner)
Parameters
Type |
Name |
Description |
System.ValueTuple<System.String, ExTP>[] |
aliases |
List of each variable and its assigned vector value
|
System.Func<TExArgCtx, TEx<T>> |
inner |
Code to execute within the scope of the variables
|
Returns
Type |
Description |
System.Func<TExArgCtx, TEx<T>> |
|
Type Parameters
Limit(tfloat, tfloat)
Limit a value x to have absolute value leq by.
Declaration
public static tfloat Limit(tfloat by, tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
by |
Positive number for absolute value comparison
|
tfloat |
x |
Number to be limited
|
Returns
Linear(tfloat, tfloat, tfloat)
Return the linear function a+b*x.
Declaration
public static tfloat Linear(tfloat a, tfloat b, tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
a |
|
tfloat |
b |
|
tfloat |
x |
|
Returns
Ln(tfloat)
Declaration
public static tfloat Ln(tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
Returns
Logsum(ExBPY, UncompiledCode<Single>[])
Calculate the logsum of several values ( (ln Sum e^ax) / a ), which is approximately equal to the largest number (smallest if sharpness is negative).
Declaration
public static ExBPY Logsum(ExBPY sharpness, UncompiledCode<float>[] against)
Parameters
Type |
Name |
Description |
ExBPY |
sharpness |
The higher the absolute value of this, the more quickly the result will converge.
|
UncompiledCode<System.Single>[] |
against |
Values
|
Returns
LPlayer()
Get the location of the player as visible to enemies.
Declaration
public static TEx<Vector2> LPlayer()
Returns
Type |
Description |
TEx<Vector2> |
|
LPlayerTrue()
Get the true location of the player. Use this for positioning player shots.
Declaration
public static TEx<Vector2> LPlayerTrue()
Returns
Type |
Description |
TEx<Vector2> |
|
Mag(tv2)
Get the magnitude of a vector2.
Declaration
public static tfloat Mag(tv2 v2)
Parameters
Type |
Name |
Description |
tv2 |
v2 |
|
Returns
Mag2(tfloat, tfloat)
Returns the quantity sqrt(x^2+y^2).
Declaration
public static tfloat Mag2(tfloat x, tfloat y)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
tfloat |
y |
|
Returns
Max(tfloat, tfloat)
Return the larger of two numbers.
Declaration
public static tfloat Max(tfloat x1, tfloat x2)
Parameters
Type |
Name |
Description |
tfloat |
x1 |
|
tfloat |
x2 |
|
Returns
MaxA(tfloat, tfloat)
Of two numbers, return the one with the larger absolute value.
Not well-defined when x1 = -x2.
Declaration
public static tfloat MaxA(tfloat x1, tfloat x2)
Parameters
Type |
Name |
Description |
tfloat |
x1 |
|
tfloat |
x2 |
|
Returns
Min(tfloat, tfloat)
Return the smaller of two numbers.
Declaration
public static tfloat Min(tfloat x1, tfloat x2)
Parameters
Type |
Name |
Description |
tfloat |
x1 |
|
tfloat |
x2 |
|
Returns
MinA(tfloat, tfloat)
Of two numbers, return the one with the smaller absolute value.
Not well-defined when x1 = -x2.
Declaration
public static tfloat MinA(tfloat x1, tfloat x2)
Parameters
Type |
Name |
Description |
tfloat |
x1 |
|
tfloat |
x2 |
|
Returns
MIndex<T>(TEx<T[]>, TEx<Single>)
Index into the provided array, treating the index as an integer and looping around to the front
if it goes out of bounds.
Declaration
public static TEx<T> MIndex<T>(TEx<T[]> arr, TEx<float> index)
Parameters
Type |
Name |
Description |
TEx<T[]> |
arr |
|
TEx<System.Single> |
index |
|
Returns
Type Parameters
Mine<T>()
Returns the object of type T associated with the entity calling this function.
eg. If this is used by a laser fired by a player option, and T = FireOption,
then this function returns the FireOption that created this laser.
eg. If this is used by a bullet fired by a boss, and T = BehaviorEntity,
then this function returns the boss that fired this bullet.
Declaration
public static Func<TExArgCtx, TEx<T>> Mine<T>()
Returns
Type |
Description |
System.Func<TExArgCtx, TEx<T>> |
|
Type Parameters
Name |
Description |
T |
One of Bullet, CurvedTileRenderLaser, PlayerController, FireOption, BehaviorEntity
|
Mul<T>(tfloat, TEx<T>)
Multiply a vectype by a number.
Declaration
public static TEx<T> Mul<T>(tfloat x, TEx<T> y)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
TEx<T> |
y |
|
Returns
Type Parameters
MulComplement(tfloat, tfloat)
Declaration
public static tfloat MulComplement(tfloat x, tfloat y)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
tfloat |
y |
|
Returns
MulInt(TEx<Int32>, TEx<Int32>)
Declaration
public static TEx<int> MulInt(TEx<int> x, TEx<int> y)
Parameters
Type |
Name |
Description |
TEx<System.Int32> |
x |
|
TEx<System.Int32> |
y |
|
Returns
Type |
Description |
TEx<System.Int32> |
|
MulRev<T>(TEx<T>, tfloat)
Multiply a vectype by a number.
Declaration
public static TEx<T> MulRev<T>(TEx<T> y, tfloat x)
Parameters
Type |
Name |
Description |
TEx<T> |
y |
|
tfloat |
x |
|
Returns
Type Parameters
Neg(tfloat)
Declaration
public static tfloat Neg(tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
Returns
Negate<T>(TEx<T>)
Declaration
public static TEx<T> Negate<T>(TEx<T> x)
Parameters
Type |
Name |
Description |
TEx<T> |
x |
|
Returns
Type Parameters
Norm(tv2)
Declaration
public static tv2 Norm(tv2 v2)
Parameters
Type |
Name |
Description |
tv2 |
v2 |
|
Returns
Norm3(tv3)
Declaration
public static tv3 Norm3(tv3 v3)
Parameters
Type |
Name |
Description |
tv3 |
v3 |
|
Returns
NPow(tfloat, tfloat)
Returns one number raised to the power of the other.
If bas is negative, then returns - (-bas)^exp. This allows fractional powers on negatives.
(Alias: ^^ bas exp)
Declaration
public static tfloat NPow(tfloat bas, tfloat exp)
Parameters
Type |
Name |
Description |
tfloat |
bas |
Base
|
tfloat |
exp |
Exponent
|
Returns
Opacity(tfloat, tfloat)
Returns 1-opacity + opacity*x
.
Declaration
public static tfloat Opacity(tfloat opacity, tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
opacity |
|
tfloat |
x |
|
Returns
OptionAngle(Func<TExArgCtx, TEx<FireOption>>)
Returns the direction of the FireOption. Primarily used for player lasers.
Declaration
public static ExBPY OptionAngle(Func<TExArgCtx, TEx<FireOption>> ctr)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<FireOption>> |
ctr |
|
Returns
OptionLocation(Func<TExArgCtx, TEx<FireOption>>)
Returns the location of the FireOption. Primarily used for player lasers.
Declaration
public static ExTP OptionLocation(Func<TExArgCtx, TEx<FireOption>> ctr)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<FireOption>> |
ctr |
|
Returns
P1(Ex)
When two firing indices have been combined via additive parametrization (see Parametrization), this retrieves the parent firing index.
Declaration
public static Ex P1(Ex t)
Parameters
Type |
Name |
Description |
Ex |
t |
|
Returns
P1M(Int32, Ex)
When two firing indices have been combined via modular parametrization (see Parametrization), this retrieves the parent firing index.
Declaration
public static Ex P1M(int mod, Ex t)
Parameters
Type |
Name |
Description |
System.Int32 |
mod |
|
Ex |
t |
|
Returns
P2(Ex)
When two firing indices have been combined via additive parametrization (see Parametrization), this retrieves the child firing index.
Declaration
public static Ex P2(Ex t)
Parameters
Type |
Name |
Description |
Ex |
t |
|
Returns
P2M(Int32, Ex)
When two firing indices have been combined via modular parametrization (see Parametrization), this retrieves the child firing index.
Declaration
public static Ex P2M(int mod, Ex t)
Parameters
Type |
Name |
Description |
System.Int32 |
mod |
|
Ex |
t |
|
Returns
PhotosTaken(TEx<BehaviorEntity>)
Get the number of photos taken of the given boss.
The BEH must be an enemy, or this will cause errors.
This number resets every card.
Declaration
public static tfloat PhotosTaken(TEx<BehaviorEntity> beh)
Parameters
Type |
Name |
Description |
TEx<BehaviorEntity> |
beh |
|
Returns
Pi()
Declaration
public static tfloat Pi()
Returns
PlayerFiringFocusT(Func<TExArgCtx, TEx<PlayerController>>)
Returns the amount of time for which the player has been firing while focusing.
Resets to zero while the player is not firing or is not focusing.
Declaration
public static ExBPY PlayerFiringFocusT(Func<TExArgCtx, TEx<PlayerController>> p)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<PlayerController>> |
p |
|
Returns
PlayerFiringFreeT(Func<TExArgCtx, TEx<PlayerController>>)
Returns the amount of time for which the player has been firing while not focusing.
Resets to zero while the player is not firing or is focusing.
Declaration
public static ExBPY PlayerFiringFreeT(Func<TExArgCtx, TEx<PlayerController>> p)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<PlayerController>> |
p |
|
Returns
PlayerFiringT(Func<TExArgCtx, TEx<PlayerController>>)
Returns the amount of time for which the player has been firing.
Resets to zero while the player is not firing.
Declaration
public static ExBPY PlayerFiringT(Func<TExArgCtx, TEx<PlayerController>> p)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<PlayerController>> |
p |
|
Returns
PlayerFocusT(Func<TExArgCtx, TEx<PlayerController>>)
Returns the amount of time for which the player has been focusing.
Resets to zero while the player is not focusing.
Declaration
public static ExBPY PlayerFocusT(Func<TExArgCtx, TEx<PlayerController>> p)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<PlayerController>> |
p |
|
Returns
PlayerFreeT(Func<TExArgCtx, TEx<PlayerController>>)
Returns the amount of time for which the player has not been focusing.
Resets to zero while the player is focusing.
Declaration
public static ExBPY PlayerFreeT(Func<TExArgCtx, TEx<PlayerController>> p)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<PlayerController>> |
p |
|
Returns
PlayerID(Func<TExArgCtx, TEx<PlayerController>>)
Declaration
public static ExBPY PlayerID(Func<TExArgCtx, TEx<PlayerController>> p)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<PlayerController>> |
p |
|
Returns
PlayerLerpFreeToFocus(Func<TExArgCtx, TEx<PlayerController>>, ExBPY)
Declaration
public static ExBPY PlayerLerpFreeToFocus(Func<TExArgCtx, TEx<PlayerController>> p, ExBPY over)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<PlayerController>> |
p |
|
ExBPY |
over |
|
Returns
PlayerMarisaADir(Func<TExArgCtx, TEx<PlayerController>>, ExBPY)
Declaration
public static ExTP PlayerMarisaADir(Func<TExArgCtx, TEx<PlayerController>> p, ExBPY ago)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<PlayerController>> |
p |
|
ExBPY |
ago |
|
Returns
PlayerMarisaAPos(Func<TExArgCtx, TEx<PlayerController>>, ExBPY)
Declaration
public static ExTP PlayerMarisaAPos(Func<TExArgCtx, TEx<PlayerController>> p, ExBPY ago)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<PlayerController>> |
p |
|
ExBPY |
ago |
|
Returns
PlayerPastDir(Func<TExArgCtx, TEx<PlayerController>>, ExBPY)
Declaration
public static ExTP PlayerPastDir(Func<TExArgCtx, TEx<PlayerController>> p, ExBPY ago)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<PlayerController>> |
p |
|
ExBPY |
ago |
|
Returns
PlayerPastPos(Func<TExArgCtx, TEx<PlayerController>>, ExBPY)
Declaration
public static ExTP PlayerPastPos(Func<TExArgCtx, TEx<PlayerController>> p, ExBPY ago)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<PlayerController>> |
p |
|
ExBPY |
ago |
|
Returns
PlayerUnFiringFocusT(Func<TExArgCtx, TEx<PlayerController>>)
Returns the amount of time for which the player has not been firing or not been focusing.
Resets to zero while the player is firing AND focusing.
Declaration
public static ExBPY PlayerUnFiringFocusT(Func<TExArgCtx, TEx<PlayerController>> p)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<PlayerController>> |
p |
|
Returns
PlayerUnFiringFreeT(Func<TExArgCtx, TEx<PlayerController>>)
Returns the amount of time for which the player has not been firing or been focusing.
Resets to zero while the player is firing AND not focusing.
Declaration
public static ExBPY PlayerUnFiringFreeT(Func<TExArgCtx, TEx<PlayerController>> p)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<PlayerController>> |
p |
|
Returns
PlayerUnFiringT(Func<TExArgCtx, TEx<PlayerController>>)
Returns the amount of time for which the player has not been firing.
Resets to zero while the player is firing.
Declaration
public static ExBPY PlayerUnFiringT(Func<TExArgCtx, TEx<PlayerController>> p)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<PlayerController>> |
p |
|
Returns
PM(Int32, Int32, Ex)
When two firing indices have been combined via modular or additive parametrization (see Parametrization), this retrieves the firing index of any point in the chain.
Roughly equivalent to mod SELF p1m CHILDREN.
Declaration
public static Ex PM(int self, int children, Ex t)
Parameters
Type |
Name |
Description |
System.Int32 |
self |
Mod size of the target point. Set to 0 to get the effect of additive parametrization.
|
System.Int32 |
children |
Product of the mod sizes of all children. Set to 1 if this is the final point.
|
Ex |
t |
Index
|
Returns
Pow<T>(TEx<T>, TEx<T>)
Declaration
public static TEx<T> Pow<T>(TEx<T> bas, TEx<T> exp)
Parameters
Type |
Name |
Description |
TEx<T> |
bas |
|
TEx<T> |
exp |
|
Returns
Type Parameters
Power()
Return the player's power value.
Declaration
public static tfloat Power()
Returns
PowerF()
Return the player's power value, floored.
Declaration
public static tfloat PowerF()
Returns
PowerIndex()
Return the player's power index.
Declaration
public static tfloat PowerIndex()
Returns
PowSub(tfloat, tfloat)
Returns one function raised to the power of the other, subtracted by the first function. (Alias: ^- bas exp)
Useful for getting polynomial curves that start at zero, eg. ^- t 1.1
Declaration
public static tfloat PowSub(tfloat bas, tfloat exp)
Parameters
Type |
Name |
Description |
tfloat |
bas |
|
tfloat |
exp |
|
Returns
RadDeg(tfloat)
Convert a number from radians to degrees.
Declaration
public static tfloat RadDeg(tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
Returns
RadDiff(tv2, tv2)
Get the rotation required, in radians, to rotate SOURCE to TARGET, in the range [-pi,pi].
Declaration
public static tfloat RadDiff(tv2 target, tv2 source)
Parameters
Type |
Name |
Description |
tv2 |
target |
|
tv2 |
source |
|
Returns
RadDiffCCW(tv2, tv2)
Get the rotation required, in radians, to rotate SOURCE to TARGET, in the range [0,2pi].
Declaration
public static tfloat RadDiffCCW(tv2 target, tv2 source)
Parameters
Type |
Name |
Description |
tv2 |
target |
|
tv2 |
source |
|
Returns
RadDiffCW(tv2, tv2)
Get the rotation required, in radians, to rotate SOURCE to TARGET, in the range [-2pi,0].
Declaration
public static tfloat RadDiffCW(tv2 target, tv2 source)
Parameters
Type |
Name |
Description |
tv2 |
target |
|
tv2 |
source |
|
Returns
RadIntoRange(tfloat)
Move a value in the range [-3pi, 3pi] to the range [-pi, pi] by adding or subtracting tau.
Declaration
public static tfloat RadIntoRange(tfloat ang_rad)
Parameters
Type |
Name |
Description |
tfloat |
ang_rad |
|
Returns
RadToNeg(tfloat)
Move a value in the range [-2pi, 2pi] to the range [-2pi, 0] by subtracting tau.
Declaration
public static tfloat RadToNeg(tfloat ang_rad)
Parameters
Type |
Name |
Description |
tfloat |
ang_rad |
|
Returns
RadToPos(tfloat)
Move a value in the range [-2pi, 2pi] to the range [0,2pi] by adding tau.
Declaration
public static tfloat RadToPos(tfloat ang_rad)
Parameters
Type |
Name |
Description |
tfloat |
ang_rad |
|
Returns
Rand(tfloat, tfloat)
Returns a random number.
This will return a random number every time it is called. It is unseeded. Do not use for movement functions.
Declaration
public static tfloat Rand(tfloat from, tfloat to)
Parameters
Type |
Name |
Description |
tfloat |
from |
Minimum
|
tfloat |
to |
Maximum
|
Returns
Randpm1()
Randomly returns either -1 or 1.
Declaration
public static tfloat Randpm1()
Returns
Reference<T>(String)
Reference a value defined in a let function, or bound within a GCX, or bound within bullet data,
or saved within bullet data.
&x = & x = reference(x)
Declaration
public static Func<TExArgCtx, TEx<T>> Reference<T>(string alias)
Parameters
Type |
Name |
Description |
System.String |
alias |
|
Returns
Type |
Description |
System.Func<TExArgCtx, TEx<T>> |
|
Type Parameters
ReferenceLet<T>(String)
Reference a value defined in a let function.
Declaration
public static Func<TExArgCtx, TEx<T>> ReferenceLet<T>(string alias)
Parameters
Type |
Name |
Description |
System.String |
alias |
|
Returns
Type |
Description |
System.Func<TExArgCtx, TEx<T>> |
|
Type Parameters
ReferenceSafe<T>(String, Func<TExArgCtx, TEx<T>>)
Reference a value saved within bullet data, or return a default value if it does not exist.
You only need to use this for bullet controls, as scoped variable usage (within movement functions) will ensure that the variable exists.
Declaration
public static Func<TExArgCtx, TEx<T>> ReferenceSafe<T>(string alias, Func<TExArgCtx, TEx<T>> deflt)
Parameters
Type |
Name |
Description |
System.String |
alias |
|
System.Func<TExArgCtx, TEx<T>> |
deflt |
|
Returns
Type |
Description |
System.Func<TExArgCtx, TEx<T>> |
|
Type Parameters
Reg2Star(tfloat, tfloat, tfloat)
Same as Reg2StarR, with theta in degrees (0-720).
Declaration
public static tfloat Reg2Star(tfloat R, tfloat n, tfloat theta)
Parameters
Type |
Name |
Description |
tfloat |
R |
|
tfloat |
n |
|
tfloat |
theta |
|
Returns
Reg2StarR(tfloat, tfloat, tfloat)
Find the radius of a regular star at a given ratio relative to one of its vertices (max radius).
Ie. a polygram with n/2 "sides".
Only works well for odd n.
Draws the star by drawing straight lines between points, ie. there are line overlaps.
Declaration
public static tfloat Reg2StarR(tfloat R, tfloat n, tfloat theta)
Parameters
Type |
Name |
Description |
tfloat |
R |
Max radius
|
tfloat |
n |
Number of points
|
tfloat |
theta |
Angle (0-4pi) (2*2pi, this 2star requires two iterations)
|
Returns
RegPoly(tfloat, tfloat, tfloat)
Same as RegPolyR, with theta in degrees (0-360).
Declaration
public static tfloat RegPoly(tfloat R, tfloat n, tfloat theta)
Parameters
Type |
Name |
Description |
tfloat |
R |
|
tfloat |
n |
|
tfloat |
theta |
|
Returns
RegPolyR(tfloat, tfloat, tfloat)
Find the radius of a regular polygon at a given ratio relative to one of its vertices (max radius).
Declaration
public static tfloat RegPolyR(tfloat R, tfloat n, tfloat theta)
Parameters
Type |
Name |
Description |
tfloat |
R |
Max radius
|
tfloat |
n |
Number of sides
|
tfloat |
theta |
Angle, radians (0-2pi)
|
Returns
RegSoftStar(tfloat, tfloat, tfloat)
Same as RegSoftStarR, with theta in degrees (0-360).
Declaration
public static tfloat RegSoftStar(tfloat R, tfloat n, tfloat theta)
Parameters
Type |
Name |
Description |
tfloat |
R |
|
tfloat |
n |
|
tfloat |
theta |
|
Returns
RegSoftStarR(tfloat, tfloat, tfloat)
Find the radius of a regular star at a given ratio relative to one of its vertices (max radius).
Ie. a polygram with n/2 "sides".
Only works well for odd n.
Draws the star by drawing an outline, ie. there are no line overlaps.
Declaration
public static tfloat RegSoftStarR(tfloat R, tfloat n, tfloat theta)
Parameters
Type |
Name |
Description |
tfloat |
R |
Max radius
|
tfloat |
n |
Number of points
|
tfloat |
theta |
Angle (0-2pi)
|
Returns
RetrieveHoisted<T>(ReflectEx.Hoist<T>, Func<TExArgCtx, TEx<Single>>)
Retrieve a publicly-shared hoisted variable at the given (name, index) pair.
Declaration
public static Func<TExArgCtx, TEx<T>> RetrieveHoisted<T>(ReflectEx.Hoist<T> hoist, Func<TExArgCtx, TEx<float>> indexer)
Parameters
Type |
Name |
Description |
ReflectEx.Hoist<T> |
hoist |
Hoisted variable name
|
System.Func<TExArgCtx, TEx<System.Single>> |
indexer |
Indexer
|
Returns
Type |
Description |
System.Func<TExArgCtx, TEx<T>> |
|
Type Parameters
RetrieveHoisted0<T>(ReflectEx.Hoist<T>)
Retrieve a publicly-shared hoisted variable with the indexer set to 0.
Declaration
public static Func<TExArgCtx, TEx<T>> RetrieveHoisted0<T>(ReflectEx.Hoist<T> hoist)
Parameters
Type |
Name |
Description |
ReflectEx.Hoist<T> |
hoist |
Hoisted variable name
|
Returns
Type |
Description |
System.Func<TExArgCtx, TEx<T>> |
|
Type Parameters
Round(tfloat)
Round a number to the nearest intereger.
Declaration
public static tfloat Round(tfloat ex)
Parameters
Type |
Name |
Description |
tfloat |
ex |
|
Returns
RV2A(trv2)
Get the rotational angle of an RV2.
Declaration
public static tfloat RV2A(trv2 rv2)
Parameters
Type |
Name |
Description |
trv2 |
rv2 |
|
Returns
RV2NX(trv2)
Get the nonrotational X-component of an RV2.
Declaration
public static tfloat RV2NX(trv2 rv2)
Parameters
Type |
Name |
Description |
trv2 |
rv2 |
|
Returns
RV2NY(trv2)
Get the nonrotational Y-component of an RV2.
Declaration
public static tfloat RV2NY(trv2 rv2)
Parameters
Type |
Name |
Description |
trv2 |
rv2 |
|
Returns
RV2RX(trv2)
Get the rotational X-component of an RV2.
Declaration
public static tfloat RV2RX(trv2 rv2)
Parameters
Type |
Name |
Description |
trv2 |
rv2 |
|
Returns
RV2RY(trv2)
Get the rotational Y-component of an RV2.
Declaration
public static tfloat RV2RY(trv2 rv2)
Parameters
Type |
Name |
Description |
trv2 |
rv2 |
|
Returns
Set<T>(ReflectEx.Alias[], Func<TExArgCtx, TEx<T>>)
Assign values to the BPI firing data. The values must already exist in the PIData context.
Declaration
public static Func<TExArgCtx, TEx<T>> Set<T>(ReflectEx.Alias[] aliases, Func<TExArgCtx, TEx<T>> inner)
Parameters
Type |
Name |
Description |
ReflectEx.Alias[] |
aliases |
List of each variable's type, name, and assigned value (eg. f myFloat 5 + t)
|
System.Func<TExArgCtx, TEx<T>> |
inner |
Code to execute after values are set
|
Returns
Type |
Description |
System.Func<TExArgCtx, TEx<T>> |
|
Type Parameters
Sign(tfloat)
Returns -1 if x lt 0 and 1 otherwise. (Note: Sign(0) = 1)
Declaration
public static tfloat Sign(tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
Returns
Sin(tfloat)
The raw sine function (period 2pi, peakheight 1).
Declaration
public static tfloat Sin(tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
Returns
SinDeg(tfloat)
The raw degree sine function (period 360, peakheight 1).
Declaration
public static tfloat SinDeg(tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
Returns
Sine(tfloat, tfloat, tfloat)
Return a sine with a custom period/amplitude.
Declaration
public static tfloat Sine(tfloat period, tfloat peakHeight, tfloat f)
Parameters
Type |
Name |
Description |
tfloat |
period |
Sine period
|
tfloat |
peakHeight |
Sine peak height
|
tfloat |
f |
Target function
|
Returns
Softmax(ExBPY, UncompiledCode<Single>[])
Calculate the softmax of several values ( (Sum xe^ax) / (Sum e^ax) )
Declaration
public static ExBPY Softmax(ExBPY sharpness, UncompiledCode<float>[] against)
Parameters
Type |
Name |
Description |
ExBPY |
sharpness |
The higher the absolute value of this, the more quickly the result will converge.
Set negative for softmin.
|
UncompiledCode<System.Single>[] |
against |
Values
|
Returns
Sqr(tfloat)
Returns the square of a number.
Declaration
public static tfloat Sqr(tfloat f)
Parameters
Type |
Name |
Description |
tfloat |
f |
|
Returns
SqrDist(tv2, tv2)
Get the normalized square distance between two parametric equations.
Declaration
public static tfloat SqrDist(tv2 f1, tv2 f2)
Parameters
Type |
Name |
Description |
tv2 |
f1 |
|
tv2 |
f2 |
|
Returns
SqrMag(tv2)
Get the square magnitude of a vector2.
Declaration
public static tfloat SqrMag(tv2 v2)
Parameters
Type |
Name |
Description |
tv2 |
v2 |
|
Returns
SqrMag2(tfloat, tfloat)
Returns the quantity x^2+y^2.
Declaration
public static tfloat SqrMag2(tfloat x, tfloat y)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
tfloat |
y |
|
Returns
SqrMag3(tfloat, tfloat, tfloat)
Returns the quantity x^2+y^2+z^2.
Declaration
public static tfloat SqrMag3(tfloat x, tfloat y, tfloat z)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
tfloat |
y |
|
tfloat |
z |
|
Returns
Sqrt(tfloat)
Returns the square root of a number.
Declaration
public static tfloat Sqrt(tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
Returns
SRand(tfloat, tfloat, tfloat)
Returns a pseudorandom value based on the seed function.
The seed function only has integer discrimination.
Declaration
public static tfloat SRand(tfloat from, tfloat to, tfloat seed)
Parameters
Type |
Name |
Description |
tfloat |
from |
Minimum
|
tfloat |
to |
Maximum
|
tfloat |
seed |
Seed function
|
Returns
SRand01(tfloat)
Returns either 0 or 1 based on the seed function.
The seed function only has integer discrimination.
Declaration
public static tfloat SRand01(tfloat seed)
Parameters
Type |
Name |
Description |
tfloat |
seed |
Seed function
|
Returns
SRandpm1(tfloat)
Returns either -1 or 1 based on the seed function.
The seed function only has integer discrimination.
Declaration
public static tfloat SRandpm1(tfloat seed)
Parameters
Type |
Name |
Description |
tfloat |
seed |
Seed function
|
Returns
Sub<T>(TEx<T>, TEx<T>)
Declaration
public static TEx<T> Sub<T>(TEx<T> x, TEx<T> y)
Parameters
Type |
Name |
Description |
TEx<T> |
x |
|
TEx<T> |
y |
|
Returns
Type Parameters
SubMax0(tfloat, tfloat)
Declaration
public static tfloat SubMax0(tfloat x, tfloat by)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
tfloat |
by |
|
Returns
Superpose<T>(tfloat, TEx<T>, tfloat, TEx<T>)
Declaration
public static TEx<T> Superpose<T>(tfloat c1, TEx<T> x1, tfloat c2, TEx<T> x2)
Parameters
Type |
Name |
Description |
tfloat |
c1 |
|
TEx<T> |
x1 |
|
tfloat |
c2 |
|
TEx<T> |
x2 |
|
Returns
Type Parameters
SuperposeC<T>(tfloat, TEx<T>, TEx<T>)
Declaration
public static TEx<T> SuperposeC<T>(tfloat c, TEx<T> x1, TEx<T> x2)
Parameters
Type |
Name |
Description |
tfloat |
c |
|
TEx<T> |
x1 |
|
TEx<T> |
x2 |
|
Returns
Type Parameters
SWing(tfloat, tfloat, tfloat)
A sine-like function (phase is that of cos) that quickly moves downwards
on its falling sections, meant to simulate the slow flapping of wings.
Declaration
public static tfloat SWing(tfloat period, tfloat peakHeight, tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
period |
Period
|
tfloat |
peakHeight |
Peak height
|
tfloat |
x |
Time
|
Returns
SWing2(tfloat, tfloat, tfloat, tfloat, tfloat, tfloat)
Declaration
public static tfloat SWing2(tfloat halfwayRatio, tfloat period, tfloat min, tfloat max, tfloat overshoot, tfloat time)
Parameters
Type |
Name |
Description |
tfloat |
halfwayRatio |
Ratio of the period that the function is going from max to min.
|
tfloat |
period |
Period of swing.
|
tfloat |
min |
Minimum value.
|
tfloat |
max |
Value at the beginning of the period (not actually the maximum value)
|
tfloat |
overshoot |
The actual maximum value. The function rises from min to overshoot, then slowly returns to max.
|
tfloat |
time |
|
Returns
Tan(tfloat)
The raw tangent function.
Declaration
public static tfloat Tan(tfloat x)
Parameters
Type |
Name |
Description |
tfloat |
x |
|
Returns
Tau()
Declaration
public static tfloat Tau()
Returns
Timer(TEx<ETime.Timer>)
Get the time (in frames) of the given timer.
Declaration
public static tfloat Timer(TEx<ETime.Timer> timer)
Parameters
Type |
Name |
Description |
TEx<ETime.Timer> |
timer |
|
Returns
TimerSec(TEx<ETime.Timer>)
Get the time (in seconds) of the given timer.
Declaration
public static tfloat TimerSec(TEx<ETime.Timer> timer)
Parameters
Type |
Name |
Description |
TEx<ETime.Timer> |
timer |
|
Returns
ToWall(tv2, tv2)
Declaration
public static tv2 ToWall(tv2 from, tv2 dir)
Parameters
Type |
Name |
Description |
tv2 |
from |
|
tv2 |
dir |
|
Returns
Twau()
Declaration
public static tfloat Twau()
Returns
UnCollidingT(Func<TExArgCtx, TEx<Bullet>>)
On a complex bullet, returns the amount of time that the bullet has been continuously not colliding for.
Declaration
public static ExBPY UnCollidingT(Func<TExArgCtx, TEx<Bullet>> ctr)
Parameters
Type |
Name |
Description |
System.Func<TExArgCtx, TEx<Bullet>> |
ctr |
|
Returns
V2X(tv2)
Get the x-component of a Vector2.
Declaration
public static tfloat V2X(tv2 tp)
Parameters
Type |
Name |
Description |
tv2 |
tp |
|
Returns
V2Y(tv2)
Get the y-component of a Vector2.
Declaration
public static tfloat V2Y(tv2 tp)
Parameters
Type |
Name |
Description |
tv2 |
tp |
|
Returns
v3Mag(tv3)
Get the magnitude of a vector3.
Declaration
public static tfloat v3Mag(tv3 v3)
Parameters
Type |
Name |
Description |
tv3 |
v3 |
|
Returns
v3SqrMag(tv3)
Get the square magnitude of a vector3.
Declaration
public static tfloat v3SqrMag(tv3 v3)
Parameters
Type |
Name |
Description |
tv3 |
v3 |
|
Returns
XMax()
X-coordinate of the rightmost section of the playing field. (Default value: 3.6)
Declaration
public static TEx<float> XMax()
Returns
Type |
Description |
TEx<System.Single> |
|
XMaxPlus1()
Declaration
public static TEx<float> XMaxPlus1()
Returns
Type |
Description |
TEx<System.Single> |
|
XMin()
X-coordinate of the leftmost section of the playing field. (Default value: -3.6)
Declaration
public static TEx<float> XMin()
Returns
Type |
Description |
TEx<System.Single> |
|
XMinMinus1()
Declaration
public static TEx<float> XMinMinus1()
Returns
Type |
Description |
TEx<System.Single> |
|
XWidth()
Width of the playing field (XMax - XMin)
Declaration
public static TEx<float> XWidth()
Returns
Type |
Description |
TEx<System.Single> |
|
YHeight()
Height of the playing field (YMax - YMin)
Declaration
public static TEx<float> YHeight()
Returns
Type |
Description |
TEx<System.Single> |
|
YMax()
Y-coordinate of the highest section of the playing field. (Default value: 4.1)
Declaration
public static TEx<float> YMax()
Returns
Type |
Description |
TEx<System.Single> |
|
YMaxPlus1()
Declaration
public static TEx<float> YMaxPlus1()
Returns
Type |
Description |
TEx<System.Single> |
|
YMin()
Y-coordinate of the lowest section of the playing field. (Default value: -4.5)
Declaration
public static TEx<float> YMin()
Returns
Type |
Description |
TEx<System.Single> |
|
YMinMinus1()
Declaration
public static TEx<float> YMinMinus1()
Returns
Type |
Description |
TEx<System.Single> |
|