# Log (Real)
Grammar — Log(x, x2)
Flags —Function
Returns the log of a number.
# Arguments
fixed
— Valuefixed
— Base
Returns — fixed
fixed libNtve_gf_Log(fixed lp_x, fixed lp_x2);
# Related
Category: Math / Arithmetic
- Absolute Value (Integer) —
int
— AbsI - Absolute Value (Real) —
fixed
— AbsF - Arithmetic (Integer)
- Bitwise Arithmetic (Integer)
- Arithmetic (Real)
- Arithmetic Multiple (Integer)
- Bitwise Arithmetic Multiple (Integer)
- Arithmetic Multiple (Real)
- Ceiling (Integer) —
int
— CeilingI - Ceiling (Real) —
fixed
— Ceiling - Clamp (Integer) —
int
— libNtve_gf_ArithmeticIntClamp - Clamp (Real) —
fixed
— libNtve_gf_ArithmeticRealClamp - Cycle
- Floor (Integer) —
int
— FloorI - Floor (Real) —
fixed
— Floor - Log2 (Integer) —
int
— Log2I - Log2 (Real) —
fixed
— Log2 - Log (Real) —
fixed
— libNtve_gf_Log - Modulo (Integer) —
int
— ModI - Modulo (Real) —
fixed
— ModF - Power (Integer) —
int
— PowI - Power (Real) —
fixed
— Pow - Round (Integer) —
int
— RoundI - Round (Real) —
fixed
— Round - Pow2 (Integer) —
int
— Pow2I - Pow2 (Real) —
fixed
— Pow2 - Square Root (Integer) —
int
— SquareRootI - Square Root (Real) —
fixed
— SquareRoot - Trunc (Integer) —
int
— TruncI - Trunc (Real) —
fixed
— Trunc
# Examples
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:3606
UnitBehaviorRemove(lp_unit, lp_behavior, c_unitBehaviorCountAll);
if ((lp_method == libCOMI_ge_UnitBuffMultiplierMethod_Exponential) && (lp_multiplierAmount != 1.0)) {
lv_multiplierStack = libNtve_gf_Log(lp_multiplierAmount, lp_baseValue);
CatalogFieldValueSet(c_gameCatalogBehavior, lp_behavior, "MinPoints", UnitGetOwner(lp_unit), IntToString(CeilingI(lv_multiplierStack)));
UnitBehaviorAddPlayer(lp_unit, lp_behavior, UnitGetOwner(lp_unit), 1);