---
tags:
    - "Base"
    - "Logarithm"
    - "Ten"
---

# Log 10

[Math](../index.md) / [Arithmetic](index.md) / **Log 10**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :red_circle: Cannot Write

</div>

## Description

Returns the base 10 logarithm of a specified number

## Code

```cs
using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]
    
    [Title("Log 10")]
    [Category("Math/Arithmetic/Log 10")]
    
    [Description("Returns the base 10 logarithm of a specified number")]
    [Image(typeof(IconLog), ColorTheme.Type.Yellow, typeof(Badge10))]
    
    [Keywords("Base", "Logarithm", "Ten")]
    
    [Serializable]
    public class TypeNumberMathLog10 : TypeNumber
    {
        [SerializeField] private GetNumber m_Number = new GetNumber();

        public override double GetPreview(GameObject source) => Math.Log10(this.m_Number.GetPreview(source));

        public override double Get(Args args)
        {
            double number = this.m_Number.Get(args);
            return Math.Log10(number);
        }

        public override string ToString()
        {
            return $"Log10({this.m_Number})";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
```

