29.08.2017, 16:29
• CMath Library
I released this plugin well before in Portuguese section before my account removal but didn't do it here until now, this was pretty much my first plugin release back then.
This plugin allows you to use some of CMath library's mathematical functions, few aren't included since they already exist.
Reference: Here
Functions:
Examples:
-Thanks to Dayvison_ for linux binary.
Download
Github
I released this plugin well before in Portuguese section before my account removal but didn't do it here until now, this was pretty much my first plugin release back then.
This plugin allows you to use some of CMath library's mathematical functions, few aren't included since they already exist.
Reference: Here
Functions:
Code:
native Float:cosh(Float:x); native Float:sinh(Float:x); native Float:tanh(Float:x); native Float:acosh(Float:x); native Float:asinh(Float:x); native Float:atanh(Float:x); native Float:exp(Float:x); native Float:frexp(Float:x, &exp); native Float:ldexp(Float:x, exp); native Float:log10(Float:x); native Float:modf(Float:x, &Float:intpart); native Float:exp2(Float:x); native Float:expm1(Float:x); native ilogb(Float:x); native Float:log1p(Float:x); native Float:log2(Float:x); native Float:logb(Float:x); native Float:scalbn(Float:x, exp); native Float:cbrt(Float:x); native Float:hypot(Float:x, Float:y); native Float:tgamma(Float:x); native Float:lgamma(Float:x); native Float:remquo(Float:numer, Float:denom, "); native Float:copysign(Float:x, Float:y); native Float:fdim(Float:x, Float:y); native Float:fmax(Float:x, Float:y); native Float:fmin(Float:x, Float:y);
PHP Code:
//Example: native Float:frexp(Float:x, &exp);
main()
{
new Float:param = 8.0, Float:result, n;
result = frexp (param , n);
printf ("%f = %f * 2^%d\n", param, result, n);
}
//Output: 8.000000 = 0.500000 * 2^4
PHP Code:
//Example: native Float:remquo(Float:numer, Float:denom, ");
main()
{
new Float: numer = 10.3, Float:denom = 4.5, Float:result, quot;
result = remquo (numer, denom, quot);
printf ("numerator: %f", numer);
printf ("denominator: %f", denom);
printf ("remainder: %f", result);
printf ("quotient: %d", quot);
}
/*
Output:
numerator: 10.300000
denominator: 4.500000
remainder: 1.300000
quotient: 2
*/
Download
Github