Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log function with custom base missing #176

Open
lieene opened this issue Oct 8, 2020 · 3 comments
Open

log function with custom base missing #176

lieene opened this issue Oct 8, 2020 · 3 comments

Comments

@lieene
Copy link

lieene commented Oct 8, 2020

Can an overload log(value, base) be added so we don't need to change base manually?
should be something like log2(value)/log2(base)

@Ph0t0nX
Copy link

Ph0t0nX commented Jul 8, 2021

I concur, this would be very useful. System.Math has an overload for a parameter with a base: https://docs.microsoft.com/en-us/dotnet/api/system.math.log?view=net-5.0

@MrUnbelievable92
Copy link

MrUnbelievable92 commented Aug 28, 2021

log b (x) = log a (x) / log a (b)

        public static float log(float x, float b)
        {
            float2 ln = math.log(new float2(x, b));

            return ln.x / ln.y;
        }

@Ph0t0nX
Copy link

Ph0t0nX commented Jul 17, 2024

Anyone here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants