Search Results for

    Show / Hide Table of Contents

    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()
    Namespace: Danmokou.DMath.Functions
    Assembly: cs.temp.dll.dll
    Syntax
    public static class ExM

    Properties

    FrameNumber

    Declaration
    public static TEx<int> FrameNumber { get; }
    Property Value
    Type Description
    TEx<System.Int32>

    inst

    Declaration
    public static Ex inst { get; }
    Property Value
    Type Description
    Ex

    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
    Type Description
    tfloat

    ACos(tfloat)

    Declaration
    public static tfloat ACos(tfloat x)
    Parameters
    Type Name Description
    tfloat x
    Returns
    Type Description
    tfloat

    ACosR(tfloat)

    Get the arccosine in radians of a number.

    Declaration
    public static tfloat ACosR(tfloat x)
    Parameters
    Type Name Description
    tfloat x
    Returns
    Type Description
    tfloat

    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
    Type Description
    trv2

    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
    Type Description
    trv2

    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
    Type Description
    trv2

    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
    Type Description
    trv2

    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
    Type Description
    trv2

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    Ceil(tfloat)

    Returns the ceil of a float value.

    Declaration
    public static tfloat Ceil(tfloat ex)
    Parameters
    Type Name Description
    tfloat ex
    Returns
    Type Description
    tfloat

    CFeature<T>()

    Get the custom feature of type T from the instance data.

    Declaration
    public static TEx<T> CFeature<T>()
    Returns
    Type Description
    TEx<T>
    Type Parameters
    Name Description
    T

    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
    Type Description
    tfloat

    Clamp01(tfloat)

    Clamp a value to the [0, 1] range.

    Declaration
    public static tfloat Clamp01(tfloat x)
    Parameters
    Type Name Description
    tfloat x
    Returns
    Type Description
    tfloat

    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
    Type Description
    ExPred

    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
    Type Description
    ExBPY

    Complement(tfloat)

    (1-x)

    Declaration
    public static tfloat Complement(tfloat x)
    Parameters
    Type Name Description
    tfloat x
    Returns
    Type Description
    tfloat

    Cos(tfloat)

    The raw cosine function (period 2pi, peakheight 1).

    Declaration
    public static tfloat Cos(tfloat x)
    Parameters
    Type Name Description
    tfloat x
    Returns
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    Decrement(tfloat)

    x-1

    Declaration
    public static tfloat Decrement(tfloat x)
    Parameters
    Type Name Description
    tfloat x
    Returns
    Type Description
    tfloat

    DecrementSubtract(tfloat, tfloat)

    x-1-y

    Declaration
    public static tfloat DecrementSubtract(tfloat x, tfloat y)
    Parameters
    Type Name Description
    tfloat x
    tfloat y
    Returns
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    DegRad(tfloat)

    Convert a number from degrees to radians.

    Declaration
    public static tfloat DegRad(tfloat x)
    Parameters
    Type Name Description
    tfloat x
    Returns
    Type Description
    tfloat

    dFloor(Ex)

    Declaration
    public static Ex dFloor(Ex ex)
    Parameters
    Type Name Description
    Ex ex
    Returns
    Type Description
    Ex

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    DistToWall(tv2, tv2)

    Declaration
    public static tfloat DistToWall(tv2 from, tv2 dir)
    Parameters
    Type Name Description
    tv2 from
    tv2 dir
    Returns
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    Exp(tfloat)

    Returns e^x.

    Declaration
    public static tfloat Exp(tfloat x)
    Parameters
    Type Name Description
    tfloat x
    Returns
    Type Description
    tfloat

    exP1M(Ex, Ex)

    Declaration
    public static Ex exP1M(Ex mod, Ex t)
    Parameters
    Type Name Description
    Ex mod
    Ex t
    Returns
    Type Description
    Ex

    exP2M(Ex, Ex)

    Declaration
    public static Ex exP2M(Ex mod, Ex t)
    Parameters
    Type Name Description
    Ex mod
    Ex t
    Returns
    Type Description
    Ex

    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
    Type Description
    Ex

    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
    Type Description
    tfloat

    Floor(tfloat)

    Returns the floor of a float value.

    Declaration
    public static tfloat Floor(tfloat ex)
    Parameters
    Type Name Description
    tfloat ex
    Returns
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    HPi()

    The constant pi/2.

    Declaration
    public static tfloat HPi()
    Returns
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Name Description
    T

    Increment(tfloat)

    x+1

    Declaration
    public static tfloat Increment(tfloat x)
    Parameters
    Type Name Description
    tfloat x
    Returns
    Type Description
    tfloat

    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
    Type Description
    tbool

    IsNoHit()

    Returns true if the player has not been hit.

    Declaration
    public static tbool IsNoHit()
    Returns
    Type Description
    tbool

    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
    Type Description
    ExBPY

    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
    Name Description
    T

    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
    Name Description
    T
    V

    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
    Name Description
    T

    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
    Name Description
    T

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    Ln(tfloat)

    Returns ln(x).

    Declaration
    public static tfloat Ln(tfloat x)
    Parameters
    Type Name Description
    tfloat x
    Returns
    Type Description
    tfloat

    Logsum(ExBPY, UncompiledCode<Single>[])

    Calculate the logsum of several values ( (ln Sum e^ax) / a ), which is slightly larger than the largest number (smaller than the 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
    Type Description
    ExBPY

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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 Description
    TEx<T>
    Type Parameters
    Name Description
    T

    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

    MulComplement(tfloat, tfloat)

    x*(1-y)

    Declaration
    public static tfloat MulComplement(tfloat x, tfloat y)
    Parameters
    Type Name Description
    tfloat x
    tfloat y
    Returns
    Type Description
    tfloat

    Neg(tfloat)

    Returns -1 * x.

    Declaration
    public static tfloat Neg(tfloat x)
    Parameters
    Type Name Description
    tfloat x
    Returns
    Type Description
    tfloat

    Norm(tv2)

    Normalize a vector2.

    Declaration
    public static tv2 Norm(tv2 v2)
    Parameters
    Type Name Description
    tv2 v2
    Returns
    Type Description
    tv2

    Norm3(tv3)

    Normalize a vector3.

    Declaration
    public static tv3 Norm3(tv3 v3)
    Parameters
    Type Name Description
    tv3 v3
    Returns
    Type Description
    tv3

    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
    Type Description
    tfloat

    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
    Type Description
    ExBPY

    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
    Type Description
    ExTP

    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
    Type Description
    Ex

    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
    Type Description
    Ex

    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
    Type Description
    Ex

    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
    Type Description
    Ex

    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
    Type Description
    tfloat

    Pi()

    The constant pi.

    Declaration
    public static tfloat Pi()
    Returns
    Type Description
    tfloat

    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
    Type Description
    ExBPY

    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
    Type Description
    ExBPY

    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
    Type Description
    ExBPY

    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
    Type Description
    ExBPY

    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
    Type Description
    ExBPY

    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
    Type Description
    ExBPY

    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
    Type Description
    ExBPY

    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
    Type Description
    ExTP

    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
    Type Description
    ExTP

    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
    Type Description
    ExTP

    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
    Type Description
    ExTP

    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
    Type Description
    ExBPY

    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
    Type Description
    ExBPY

    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
    Type Description
    ExBPY

    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
    Type Description
    Ex

    Power()

    Return the player's power value.

    Declaration
    public static tfloat Power()
    Returns
    Type Description
    tfloat

    PowerF()

    Return the player's power value, floored.

    Declaration
    public static tfloat PowerF()
    Returns
    Type Description
    tfloat

    PowerIndex()

    Return the player's power index.

    Declaration
    public static tfloat PowerIndex()
    Returns
    Type Description
    tfloat

    RadDeg(tfloat)

    Convert a number from radians to degrees.

    Declaration
    public static tfloat RadDeg(tfloat x)
    Parameters
    Type Name Description
    tfloat x
    Returns
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    Randi(TEx<Int32>, TEx<Int32>)

    Returns a random integer in the range [from, to). This will return a random number every time it is called. It is unseeded. Do not use for movement functions.

    Declaration
    public static TEx<int> Randi(TEx<int> from, TEx<int> to)
    Parameters
    Type Name Description
    TEx<System.Int32> from

    Minimum

    TEx<System.Int32> to

    Maximum

    Returns
    Type Description
    TEx<System.Int32>

    Randpm1()

    Randomly returns either -1 or 1.

    Declaration
    public static tfloat Randpm1()
    Returns
    Type Description
    tfloat

    ReadEF<T>(TEx<EnvFrame>, String)

    Reading a value from a specific EnvFrame.

    Declaration
    public static Func<TExArgCtx, TEx<T>> ReadEF<T>(TEx<EnvFrame> ef, string varName)
    Parameters
    Type Name Description
    TEx<EnvFrame> ef
    System.String varName
    Returns
    Type Description
    System.Func<TExArgCtx, TEx<T>>
    Type Parameters
    Name Description
    T

    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
    Name Description
    T

    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
    Name Description
    T

    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
    Name Description
    T

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Name Description
    T

    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
    Name Description
    T

    Round(tfloat)

    Round a number to the nearest intereger.

    Declaration
    public static tfloat Round(tfloat ex)
    Parameters
    Type Name Description
    tfloat ex
    Returns
    Type Description
    tfloat

    RV2A(trv2)

    Get the rotational angle of an RV2.

    Declaration
    public static tfloat RV2A(trv2 rv2)
    Parameters
    Type Name Description
    trv2 rv2
    Returns
    Type Description
    tfloat

    RV2NX(trv2)

    Get the nonrotational X-component of an RV2.

    Declaration
    public static tfloat RV2NX(trv2 rv2)
    Parameters
    Type Name Description
    trv2 rv2
    Returns
    Type Description
    tfloat

    RV2NY(trv2)

    Get the nonrotational Y-component of an RV2.

    Declaration
    public static tfloat RV2NY(trv2 rv2)
    Parameters
    Type Name Description
    trv2 rv2
    Returns
    Type Description
    tfloat

    RV2RX(trv2)

    Get the rotational X-component of an RV2.

    Declaration
    public static tfloat RV2RX(trv2 rv2)
    Parameters
    Type Name Description
    trv2 rv2
    Returns
    Type Description
    tfloat

    RV2RY(trv2)

    Get the rotational Y-component of an RV2.

    Declaration
    public static tfloat RV2RY(trv2 rv2)
    Parameters
    Type Name Description
    trv2 rv2
    Returns
    Type Description
    tfloat

    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
    Name Description
    T

    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
    Type Description
    tfloat

    Sin(tfloat)

    The raw sine function (period 2pi, peakheight 1).

    Declaration
    public static tfloat Sin(tfloat x)
    Parameters
    Type Name Description
    tfloat x
    Returns
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    Softmax(ExBPY, UncompiledCode<Single>[])

    Calculate the softmax of several values ( (Sum xe^ax) / (Sum e^ax) ), which is slightly smaller than the largest number (larger than the smallest if sharpness is negative).

    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
    Type Description
    ExBPY

    Sqr(tfloat)

    Returns the square of a number.

    Declaration
    public static tfloat Sqr(tfloat f)
    Parameters
    Type Name Description
    tfloat f
    Returns
    Type Description
    tfloat

    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
    Type Description
    tfloat

    SqrMag(tv2)

    Get the square magnitude of a vector2.

    Declaration
    public static tfloat SqrMag(tv2 v2)
    Parameters
    Type Name Description
    tv2 v2
    Returns
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    Sqrt(tfloat)

    Returns the square root of a number.

    Declaration
    public static tfloat Sqrt(tfloat x)
    Parameters
    Type Name Description
    tfloat x
    Returns
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    SubMax0(tfloat, tfloat)

    max(0, x-by).

    Declaration
    public static tfloat SubMax0(tfloat x, tfloat by)
    Parameters
    Type Name Description
    tfloat x
    tfloat by
    Returns
    Type Description
    tfloat

    Superpose<T>(tfloat, TEx<T>, tfloat, TEx<T>)

    Returns c1*x1 + c2*x2.

    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 Description
    TEx<T>
    Type Parameters
    Name Description
    T

    SuperposeC<T>(tfloat, TEx<T>, TEx<T>)

    Returns c*x1 + (1-c)*x2.

    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 Description
    TEx<T>
    Type Parameters
    Name Description
    T

    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
    Type Description
    tfloat
    Remarks

    See https://www.desmos.com/calculator/jeo6rrqzsd

    SWing2(tfloat, tfloat, tfloat, tfloat, tfloat, tfloat)

    A better sine-like swing function (also cosine phase).
    See https://www.desmos.com/calculator/uwwfsslxrj

    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
    Type Description
    tfloat

    Tan(tfloat)

    The raw tangent function.

    Declaration
    public static tfloat Tan(tfloat x)
    Parameters
    Type Name Description
    tfloat x
    Returns
    Type Description
    tfloat

    Tau()

    The constant pi*2.

    Declaration
    public static tfloat Tau()
    Returns
    Type Description
    tfloat

    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
    Type Description
    tfloat

    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
    Type Description
    tfloat

    ToWall(tv2, tv2)

    Declaration
    public static tv2 ToWall(tv2 from, tv2 dir)
    Parameters
    Type Name Description
    tv2 from
    tv2 dir
    Returns
    Type Description
    tv2

    Twau()

    The constant pi*4.

    Declaration
    public static tfloat Twau()
    Returns
    Type Description
    tfloat

    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
    Type Description
    ExBPY

    V2X(tv2)

    Get the x-component of a Vector2.

    Declaration
    public static tfloat V2X(tv2 tp)
    Parameters
    Type Name Description
    tv2 tp
    Returns
    Type Description
    tfloat

    V2Y(tv2)

    Get the y-component of a Vector2.

    Declaration
    public static tfloat V2Y(tv2 tp)
    Parameters
    Type Name Description
    tv2 tp
    Returns
    Type Description
    tfloat

    v3Mag(tv3)

    Get the magnitude of a vector3.

    Declaration
    public static tfloat v3Mag(tv3 v3)
    Parameters
    Type Name Description
    tv3 v3
    Returns
    Type Description
    tfloat

    v3SqrMag(tv3)

    Get the square magnitude of a vector3.

    Declaration
    public static tfloat v3SqrMag(tv3 v3)
    Parameters
    Type Name Description
    tv3 v3
    Returns
    Type Description
    tfloat

    WriteEF<T>(TEx<EnvFrame>, String, TEx<T>)

    Write a value to a specific EnvFrame.

    Declaration
    public static Func<TExArgCtx, TEx<T>> WriteEF<T>(TEx<EnvFrame> ef, string varName, TEx<T> value)
    Parameters
    Type Name Description
    TEx<EnvFrame> ef
    System.String varName
    TEx<T> value
    Returns
    Type Description
    System.Func<TExArgCtx, TEx<T>>
    Type Parameters
    Name Description
    T

    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()

    XMax + 1

    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()

    XMin - 1

    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()

    YMax + 1

    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()

    YMin - 1

    Declaration
    public static TEx<float> YMinMinus1()
    Returns
    Type Description
    TEx<System.Single>
    In This Article
    Back to top Generated by DocFX