Nerd_STF 2.4.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Nerd_STF --version 2.4.0
NuGet\Install-Package Nerd_STF -Version 2.4.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Nerd_STF" Version="2.4.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Nerd_STF --version 2.4.0
#r "nuget: Nerd_STF, 2.4.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Nerd_STF as a Cake Addin
#addin nuget:?package=Nerd_STF&version=2.4.0

// Install Nerd_STF as a Cake Tool
#tool nuget:?package=Nerd_STF&version=2.4.0

Nerd_STF

Table of Contents

What is it?

Nerd_STF is a multi-purpose .NET 7.0 library that contains many objects I feel would help the default C# library package. Feel free to do with it what you'd like.

Nerd_STF includes some math as well as many other computer science topics. It contains types like groups of floats/ints, geometry types like Vert, Line, and Triangle, and color types like RGBA, CMYKA, HSVA, and their byte equivalents, all of which can convert seamlessly between each other.

What about Nerd_STF Versions 2021?

Nerd_STF 2021 used an different version scheme, based on the year, as you might have guessed (it is not the year 2 right now), and while I will be keeping the 2021 versions up, I wouldn't recommend using them, and the code is old code, written by a more naive me. Hell, I wrote an entire List<T> class there before I knew of the System.Collections.Generic.List<T> class that did literally everything for me already. Oh well. So, keep that in mind when you check out those versions of the library.

How do I install it?

The NuGet package for this library is here, so you could always install it that way using the .NET CLI:

  1. Open your terminal in your project directory.
  2. Enter this command: dotnet add package Nerd_STF
  3. There is no step 3.

You can also include the NuGet package via a package reference in your project file:

  1. Open your project file.
  2. Add this to the XML data: <PackageReference Include="Nerd_STF" />
  3. There is no step 3.

Alternatively, you can install it via a project reference in Visual Studio 2019 and 2022. Here's how:

  1. Download the latest library release from the GitHub repository, extract the files, and save them somewhere you can find later. The files must all be in the same direcrtory/folder together.
  2. Open Visual Studio 2019 or 2022.
  3. Right-click your .NET project in the Solution Explorer.
  4. Hover over "Add >" list and then click "Project Reference..."
  5. Click "Browse," and locate the .dll file you previously extracted (the full name is "Nerd_STF.dll").
  6. Click "Add," then "OK," and the library is now imported!

I've found a bug!

I'm not suprised, there are definitely a bunch of undiscovered bugs in Nerd_STF simply because I'm just one person. If you've found one, please do me a favor and create an issue about it in the GitHub repository. They likely aren't difficult fixes, they are just hard to spot even with some level of testing.

I'd like to contribute.

I would love some contributions! I probably won't accept drastic pull requests or merges with the library, but small changes are quite welcome! I'm just one person and I can only do so much work by myself. If you want to contribute, please only edit the current version branch (eg. if we are on version 2.3.1, edit the v2.3 branch). Please do not edit the main branch. I will merge the changes with main myself.

Try to follow a similar style to the current library, but otherwise I'm open to changes. Thank you to those who contribute!

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.4.1 202 7/17/2023
2.4.0 147 7/10/2023
2.3.2 244 3/9/2023
2.3.1.68 339 11/12/2022
2.3.1.52-alpha 210 10/31/2022
2.3.1.39-alpha 178 9/30/2022
2.3.0 400 8/2/2022
2.2.0 413 6/10/2022
2.1.2 421 5/2/2022
2.1.1 387 4/17/2022
2.1.0 408 4/17/2022
2.0.1 416 4/3/2022
2.0.0 408 4/3/2022

I've done a pretty good amount of stuff in this update, and I'm pretty proud of it. Good improvement.

First of all, I've gone and added all of the applicable `Mathf` functions as an extension to the `Equation` delegate. That way if you want to say, calculate the square root of an entire equation, rather than going:
```csharp
Equation result = x => Mathf.Sqrt(equ(x));
// Where `equ` is an `Equation` that represents the function we want to take the square root of.
```
you can shorten it down and remove some of the weirdness.
```csharp
Equation result = equ.Sqrt();
// Where `equ` is an `Equation` that represents the function we want to take the square root of.
```

It works for any common function you'd want to apply to an equation.

---

Speaking of math functions (I guess that's the whole update, given the name), I'm now utilizing an implementation of CORDIC I made to calculate all trigonometric functions, hyperbolic trig functions, exponents, and logs. It's quite a neat process, and I could also have it completely wrong, but whatever I have, CORDIC or something else, works wonders, and is considerably faster than some other methods I tried. Of course, it's still nowhere near as fast as the built-in math functions, but they will always be on a whole other level. Maybe in the optimization update I'll bother to improve them, but they work quite well as-is for most use cases.

I've also implemented taylor series into the `Calculus` class. It's not particularly useful is most cases, so I wouldn't bother. The only time it would be a good idea to use it is if you've got some incredibly slow to calculate equation and want to optimize it. The function will take a long time at first, as it will have to generate second-derivatives and beyond, but afterwards the output equation will just be a simple-to-calculate polynomial (though the approximation gets worse the further you are from the reference point). If you've got an equation that's already fast to calculate, using the taylor series approximation will only be a negative. So take it with a grain of salt.

That's mostly it. I've fixed some issues/bugs here and there, renamed some small stuff (check the full changelog for more information), removed all the stuff marked obsolete and to be removed in this update, added some more math stuff like prime calculators, and other tiny changes. The next update will be focused on reworking the badly made geometry stuff I did a while back ([Version 2.1](https://github.com/That-One-Nerd/Nerd_STF/releases/tag/v2.1.0)). I know I say this all the time, but version 2.5 should be substantially bigger than this one. I'm going to be reworking the `Polygon` object entirely and will be improving quite a lot of other things in the whole `Nerd_STF.Mathematics.Geometry` namespace. Stay tuned!