https://github.com/jirikostiha/smath
Alternative math library based on .Net 7 generic math.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.3%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Alternative math library based on .Net 7 generic math.
Basic Info
Statistics
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 2
- Releases: 9
Topics
Metadata Files
readme.md
SMath
Overview
SMath is a math library built on .NET 7 generic math, offering a comprehensive set of static types for working with 2D geometry and statistics.
Features
Generic Math Capabilities
Leverages .NET 7s new generic math features, allowing type-safe mathematical operations on various numeric types.
Geometry (2D)
Handle 2D geometric computations with ease. Available types and operations include:
- Point
- Euclidean distance, Manhattan distance, Chebyshev distance, Minkowski distance
- Euclidean distance, Manhattan distance, Chebyshev distance, Minkowski distance
- Line
- Ray, Line Segment
- Operations: Projection, Intersection, Inclusion
- Ray, Line Segment
- Circle
- Arc, Chord, Sector, Segment
- Operations: Perimeter, Region, Tangent Points, Inclusion
- Arc, Chord, Sector, Segment
- Rectangles
- Vertices
- Operations: Perimeter
- Vertices
Statistical Analysis
Perform basic statistical calculations:
- Correlation
- Variance
- Covariance
- Standard Deviation
- Histograms
Setup
Add nuget package to project.
xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SMath" Version="X.X.X" />
</ItemGroup>
</Project>
Replace 'X.X.X' with the appropriate version from NuGet.
Usage
Here are some basic usage examples to get started with SMath:
Geometry: Working with Circles and Lines
```cs // Using double precision var line1 = Circle.TangentLine.FromAngle(radius: 5d, angle: Math.PI / 4d);
// Using float precision var line2 = Circle.TangentLine.FromAngle(radius: 5f, angle: MathF.PI / 4f);
// Find tangent points from a circle var tangentPoints = Circle.TangentPoint.FromPoint(radius: 2d, (4, 4)); var secantLine = Line.FromTwoPoints(tangentPoints.Value.Point1, tangentPoints.Value.Point2); ```
Statistical Calculations
cs
// Example of calculating variance
var values = new double[] { 1, 2, 3, 4, 5 };
double variance = Statistics.Variance(values);
Console.WriteLine($"Variance: {variance}");
Contributing
Any ideas, contributions and bug reports are welcome!
For new idea create an issue.
For bug report create an issue.
For contribution create a pull request.
License
Project is under MIT license.
Owner
- Login: jirikostiha
- Kind: user
- Location: Prague, Czech Republic
- Repositories: 3
- Profile: https://github.com/jirikostiha
GitHub Events
Total
- Release event: 4
- Watch event: 1
- Delete event: 7
- Push event: 26
- Pull request review event: 4
- Pull request event: 4
- Create event: 12
Last Year
- Release event: 4
- Watch event: 1
- Delete event: 7
- Push event: 26
- Pull request review event: 4
- Pull request event: 4
- Create event: 12
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Jiri Kostiha | i****a@g****m | 196 |
| C# linter | l****n@s****m | 31 |
| dependabot[bot] | 4****] | 12 |
| Jasper1467 | 3****7 | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 20
- Average time to close issues: N/A
- Average time to close pull requests: 16 days
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 17
- Bot issues: 0
- Bot pull requests: 20
Past Year
- Issues: 0
- Pull requests: 4
- Average time to close issues: N/A
- Average time to close pull requests: 17 days
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 4
Top Authors
Issue Authors
Pull Request Authors
- dependabot[bot] (20)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- nuget 2,379 total
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 9
- Total maintainers: 1
nuget.org: smath
Alternative math library based on .Net 7 generic math.
- Homepage: https://github.com/jirikostiha/smath
- License: MIT
-
Latest release: 0.9.0
published 11 months ago