1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-26 01:38:48 +00:00
Commit Graph

1143 Commits

Author SHA1 Message Date
87b6dbdd56
test: bring coverage to 100% for integer Unpack (#70) 2023-04-01 21:56:45 +01:00
5f21a2102d
feat: pack README.md in nupkg 2023-04-01 21:16:57 +01:00
ca5f95bbf6
test: test RuneExtensions for .NET >= 5 2023-04-01 18:59:24 +01:00
e52e9096e0
feat: expose ComplexSqrt to all frameworks 2023-04-01 18:54:04 +01:00
1acee3bf72
fix(test): fix incorrect date being returned for .NET Standard 2.1 2023-04-01 18:20:44 +01:00
5714ef73c1
test: 100% coverage on stream Read/Write methods 2023-04-01 18:17:50 +01:00
fa2236e72a
fix: write float, not double, in Stream.WriteSingle
This was a side effect of 2815c505c3 since I had copy/pasted the blocks. Oops.
2023-04-01 17:14:46 +01:00
990f860b39
perf: accept ReadOnlySpan<byte> in WriteInternal
This method does not mutate the input span in any way, and so its input can be read-only.
2023-04-01 17:11:47 +01:00
2815c505c3
fix: fix incorrect float/double being written for netstandard2.1
The call to _To_Bits yields the result containing the same bytes, but not the same value. This value was then stored as-is into the parameter, which causes a conversion on how the value is stored, ultimately causing the wrong value to be written to the stream.
2023-04-01 17:11:05 +01:00
677259b91c
fix: fixed Stream.ReadSingle returning wrong type
ReadSingle previously returned a double, and this never failed unit tests since float -> double is a widening conversion, with values being comparable.
2023-04-01 17:08:34 +01:00
b2a27cdafb
fix(test): fix Clear unit test not creating the temp directory 2023-04-01 17:06:19 +01:00
35113fac27
test: run tests for .NET 7, 6, and Core 3.1
.NET Core 3.1 allows testing of the .NET Standard 2.1 implementation of X10D
2023-04-01 17:05:46 +01:00
39c8c7defb
style: cluster throw helpers together to reduce branch repetition 2023-04-01 14:37:37 +01:00
431e72a4c1
fix: use ArgumentNullException throw helper for .NET >=6
Some of these directives were incorrectly written as #if NET6_0, when ThrowIfNull is available in all future versions too. The macro has been fixed to #if NET6_0_OR_GREATER.

For other methods, the branch has been introduced where it didn't exist before.
2023-04-01 14:35:00 +01:00
dd325ba5c9
test: test Equals(object) for various Drawing types
This brings coverage to 100% for the affected types.
2023-04-01 00:30:51 +01:00
8b768f824c
test: add tests for Point.IsOnLine and PointF.IsOnLine 2023-04-01 00:30:04 +01:00
6e7e162ffe
test: 100% coverage on MultiplicativePersistence 2023-03-31 23:19:21 +01:00
ee0df8c9c2
[ci skip] docs: vertically center Unity branding 2023-03-31 23:06:48 +01:00
150028716c
[ci skip] fix(docs): rename master -> main
This change was made quite a while ago, actually. Surprisingly, it's gone unnoticed for a long time. 

"Nevermore," quoth the raven.
2023-03-31 23:02:56 +01:00
4cfa7fef52
[ci skip] fix(docs): fix CONTRIBUTING.md link 2023-03-31 23:01:19 +01:00
51ae070210
[ci skip] fix(docs): -y
It's 11pm leave me alone.
2023-03-31 22:58:18 +01:00
83f9737b02
[ci skip] docs(repo): add tailored README for X10D.Unity 2023-03-31 22:57:09 +01:00
6eb74c15ee
[ci skip] style: add social embed branding export 2023-03-31 22:30:25 +01:00
78f2c13a1b
style: update branding
The icon is now exported from vector artboards rather than a raster.
2023-03-31 22:22:52 +01:00
ce1c2e8397
[ci skip] docs(style): update branding 2023-03-31 22:19:41 +01:00
ec266063f9
fix(DoS): specify timeout in Regex ctor
This isn't actually a "fix", the method may be slow by design if the source is lazily enumerated. SonarCloud, however, did not like this method not having an explicit timeout. If SonarCloud continues to complain, we'll just shut its mouth masking tape and throw it in the broom closet.
2023-03-31 21:29:29 +01:00
e70781ef0f
perf: remove redundant 6k ± 1 check in IsPrime
No integers >3 satisfy the condition of being odd AND not being a multiple of 3 (as checked above) AND not being in the form 6k ± 1. This condition never evaluates to true, and so the return is never reached and was preventing this method from hitting 100% code coverage.
2023-03-31 21:25:17 +01:00
c8ccb1deb8
perf: remove redundant 0 check in Sqrt
This check was a defensive manoeuvrer in the event that the input is 0, but this condition has already been verified to be false with the switch guard clause.

This changes bumps coverage to 100% for Sqrt.
2023-03-31 20:40:06 +01:00
3d2baf595b
test: 100% coverage on Wrap for all types 2023-03-31 20:37:50 +01:00
3f47a4ec44
[ci skip] test: rename Pack8Bit to PackByte 2023-03-31 20:23:56 +01:00
62034ded75
style(test): segment methods to partials
This changes introduces the Moq package to create mocked objects implementing IDisposable, rather than defining a concrete class.
2023-03-31 20:21:17 +01:00
626f1e931c
style: use explicit type for Vector128<byte> 2023-03-31 20:18:22 +01:00
f293f247e7
[ci skip] style: remove unused using directives 2023-03-31 20:18:01 +01:00
09d3c311d9
test: exclude "packing magic" properties from coverage 2023-03-31 20:17:27 +01:00
4152c289e3
[ci skip] style: restrict scope of pragma suppression 2023-03-31 20:16:57 +01:00
708207305c
test: use fixed point of reference for Age tests 2023-03-31 20:15:59 +01:00
3734965757
test: bring coverage to 94% for RuneExtensions 2023-03-31 20:11:03 +01:00
e852726b66
test: 100% coverage on Enumerable and String methods in Text namespace 2023-03-31 18:53:08 +01:00
369882c1e8
[ci skip] style: remove unused using directives 2023-03-31 18:52:12 +01:00
275d98fbf8
feat: add LowestCommonMultiple for built-in integer types
This was previously incorrectly documented in CHANGELOG.md. The method now exists. Sorry about that
2023-03-31 18:07:50 +01:00
9ee99d72d3
[ci skip] style: upgrade projects to C# 11
NB: While using a higher C# version with lower framework version is possible, it's generally advised against because C# syntax may map to .NET types not available in older versions such as .NET Standard 2.1.

This change does not invite the codebase to upgrade to newer types, but rather take advantage of syntax sugar (such as file-scoped namespaces, when this project was updated to C# 10) that does not effect the compiled result.

However, this change does open up the possibilities to add extension methods for the "generic math" interfaces (made possible by static interface members), and these upcoming methods will be targeted to .NET 7 or greater **ONLY**.
2023-03-31 17:30:30 +01:00
3cb459028f
[ci skip] docs: use C# 10 "where feasible" 2023-03-31 15:18:32 +01:00
dd1a423752
[ci skip] docs: do england more gooder
Rider threw some warnings about grammar here. This change fixes the grammar. Rider has been tossed to the gulag
2023-03-31 15:18:05 +01:00
b406b4dbb0
[ci skip] docs: update copyright year in LICENSE.md 2023-03-31 15:12:59 +01:00
4cd669a200
[ci skip] fix(test): force enumeration of lazy enumerable 2023-03-31 15:11:50 +01:00
38112f07ac
[ci skip] style: remove trailing whitespace 2023-03-31 15:10:51 +01:00
d56d12ca23
perf: lazily yield additional value
This prevents an allocation of the array, saving approximately half. Initial benchmarks also show this implementation to be ~100ns faster
2023-03-31 15:07:08 +01:00
14e638e6d9
feat: add IEnumerable<T>.ConcatOne 2023-03-31 14:53:02 +01:00
33c5361c0b
fix/perf: return zero vector for identity quaternion 2023-03-31 01:33:38 +01:00
cd4c3542f7
fix: use intrinsic convention for ToVector3 2023-03-31 01:31:19 +01:00