### OpenUPM Installation Source: https://github.com/freyaholmer/mathfs/blob/master/README.md Command to install the Mathfs library using the OpenUPM CLI. This method requires prior installation of the openupm-cli tool. ```bash openupm add com.acegikmo.mathfs ``` -------------------------------- ### Unity Package Manager Installation Source: https://github.com/freyaholmer/mathfs/blob/master/README.md Instructions for installing the Mathfs library into a Unity project using the Unity Package Manager (UPM) with Git URLs. It provides options for targeting specific versions or the latest commit. ```json "com.acegikmo.mathfs": "https://github.com/FreyaHolmer/Mathfs.git#0.1.0", ``` ```json "com.acegikmo.mathfs": "https://github.com/FreyaHolmer/Mathfs.git", ``` -------------------------------- ### Mathfs C# Namespace Source: https://github.com/freyaholmer/mathfs/blob/master/README.md Demonstrates how to include the Mathfs library in C# scripts within a Unity project by using the 'Freya' namespace. ```csharp using Freya; ``` -------------------------------- ### Mathfs Min/Max Behavior Source: https://github.com/freyaholmer/mathfs/blob/master/README.md Details the behavior of Min/Max functions in Mathfs when provided with empty inputs. Unlike Unity's Mathf, Mathfs will throw an exception instead of returning 0. ```csharp // Example of Min/Max with empty input (will throw exception in Mathfs) // float minValue = Mathf.Min(); ``` -------------------------------- ### Mathfs Smoothstep Alternative Source: https://github.com/freyaholmer/mathfs/blob/master/README.md Explains that Mathfs removes the 'Smoothstep' function in favor of explicit 'LerpSmooth' and 'InverseLerpSmooth' functions, which provide clearer control over interpolation. ```csharp // Instead of Smoothstep, use LerpSmooth float smoothedValue = Mathf.LerpSmooth(0f, 1f, 0.5f); // Or InverseLerpSmooth for the inverse operation float inverseSmoothedValue = Mathf.InverseLerpSmooth(0f, 1f, 0.5f); ``` -------------------------------- ### Mathfs Lerp and InverseLerp Behavior Source: https://github.com/freyaholmer/mathfs/blob/master/README.md Highlights the differences in Lerp and InverseLerp implementations in Mathfs compared to Unity's Mathf. Mathfs's Lerp is unclamped by default, with clamped versions available as special cases. It also uses a more numerically stable evaluation. ```csharp // Mathfs Lerp is unclamped by default float lerpValue = Mathf.Lerp(0f, 1f, -0.5f); // Returns -0.5f // Clamped versions are explicit exceptions float lerpClampedValue = Mathf.LerpClamped(0f, 1f, -0.5f); // Returns 0f ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.