1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-10 05:15:43 +00:00
Commit Graph

667 Commits

Author SHA1 Message Date
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
02947944cd
fix: accept ReadOnlySpan not Span for search needle 2023-03-30 21:23:46 +01:00
f360311d9c
perf: exit early if TryGetNonEnumeratedCount is 0 2023-03-30 20:56:34 +01:00
006523d342
[ci skip] perf: convert Count to for loop with index access 2023-03-30 20:21:29 +01:00
3ce8d281b7
feat: add TextReader.EnumerateLines/Async 2023-03-30 17:55:41 +01:00
12d2e10be4
[ci skip] docs: mention ArgumentNullException for Grep 2023-03-30 17:43:56 +01:00
d0f94a6493
feat: add IEnumerable<string>.Grep() 2023-03-30 17:29:54 +01:00
f49188b428
feat: add string.EnsureEndsWith and string.EnsureStartsWith 2023-03-30 02:09:04 +01:00
4dd31ec1b6
[ci skip] style: reformat & cleanup solution 2023-03-29 17:46:56 +01:00
436f56d912
feat: add Saturate for floating point types (#60) 2023-03-29 16:21:16 +01:00
e0bdaaddce
style/perf: reduce complexity of MinMax and MinMaxBy 2023-03-28 16:28:59 +01:00
3bc2ae45c7
style: remove unused using directive 2023-03-28 15:44:48 +01:00
e3dcad5690
build(nupkg): use MSBuildProjectDirectory and go up 1 level
SolutionDir macro is returning empty/null in workflow, causing a job failure since CHANGELOG.md is not in root.

this may or may not fix the workflow. tba
2023-03-28 15:11:09 +01:00
2cb6567410
build(nupkg): add PackageReleaseNotes to csproj 2023-03-28 14:27:15 +01:00
3b85419da3
Add MinMax and MinMaxBy (resolves #72) 2023-03-26 17:03:40 +01:00
e00a673a04
i is for I will scream at these changes 2023-03-23 15:11:44 +00:00
ea26b5a7e1
Use explicit type where non-evident in SpanExtensions 2023-03-23 15:11:15 +00:00
136382a2a3
[ci skip] Revert 167a55e2db
Code analysis can suck an egg. We needed this actually
2023-03-23 15:07:09 +00:00
167a55e2db
[ci skip] Remove redundant unsafe method modifiers 2023-03-23 15:06:01 +00:00
cb80d19451
[ci skip] Fix xmldoc for SpanExtensions.Contains 2023-03-23 15:02:57 +00:00
RealityProgrammer
44165b310d Move exception message to the right resource resx 2023-03-14 22:03:21 +07:00
RealityProgrammer
0bf4d7ba77 Again, fix source validator reports 2023-03-14 21:41:35 +07:00
RealityProgrammer
77b0a8ca39 Move some intrinsic methods around, reimplement RuneExtensions.Repeat(Rune, Int32) 2023-03-14 21:18:01 +07:00
RealityProgrammer
8b8aeb3f56 Fix source validator's code reports, remove 95% of AdvSimd implementation to prevent future consequences 2023-03-14 19:17:19 +07:00
RealityProgrammer
ec8e60c6dc Rephrase note message 2023-03-08 13:38:28 +07:00
RealityProgrammer
1651f0ed19 Software fallback implementation for methods in IntrinsicExtensions 2023-03-08 13:35:24 +07:00
RealityProgrammer
0c9623bab3 Add missing XML documentations 2023-03-08 10:14:24 +07:00
RealityProgrammer
d41bdc871d Merge branch 'main' of https://github.com/RealityProgrammer/X10D 2023-03-08 09:47:59 +07:00
RealityProgrammer
b251f880ff Optimize Rune.Repeat(int) when UTF8 sequence length is 1 or 2 and reformat some intrinsic code 2023-03-08 09:46:20 +07:00
Oliver Booth
a685d6ec39
Merge branch 'develop' into main 2023-03-07 17:30:15 +00:00
RealityProgrammer
e176f65e97 Commit git's untracked files 2023-03-07 16:50:04 +07:00
RealityProgrammer
dc8b263f1e Fast Int32, Int64 packing 2023-03-07 16:48:02 +07:00
RealityProgrammer
6f343cd393 Fast Int16 packing 2023-03-07 08:58:53 +07:00
RealityProgrammer
5e4044f965 Code fixup, fast Int8 packing 2023-03-06 10:39:58 +07:00
RealityProgrammer
a808cab37f Optimize DictionaryExtensions and handle CodeAnalysis errors 2023-03-06 07:50:10 +07:00
RealityProgrammer
4300e35b4e Replace stackalloc and ToArray combination to array initialization directly 2023-03-06 07:17:32 +07:00
RealityProgrammer
e1a7ac03c6 Added SpanExtensions and the reinterpret between Unity's structs to System.Numerics structs 2023-03-06 06:49:07 +07:00
RealityProgrammer
1e98e6910f Initial commit with SIMD implementation and some other specialization methods 2023-03-05 23:57:11 +07:00
799bc77ec8
Add IsEmpty/IsWhiteSpace and IsNullOrEmpty/WhiteSpace for string 2023-02-28 19:05:03 +00:00
041181cc5a
Add IEnumerable<T?>.WhereNotNull() 2023-02-27 21:11:37 +00:00
7a6dbef4f9
[ci skip] Fix null-check precondition for WhereNot<T> 2023-02-27 21:11:07 +00:00
3ef6cf2cde
Fix xmldoc for decimal.Sqrt 2023-02-27 17:19:12 +00:00
db2def1eab
Add Wrap for built-in numeric types (#60) 2023-02-27 17:18:44 +00:00
3fc2e7259e
Add Random.NextFrom([ReadOnly]Span<T>) 2023-02-27 13:15:20 +00:00
d1454a1170
[ci skip] Add unit tests for ScaleRange
Add Aggressive implementations, and annotate as Pure
2023-02-26 13:33:01 +00:00
81f1a7c1e0
Inline Lerp/InverseLerp expression in ScaleRange 2023-02-26 13:26:08 +00:00
795d696eca
Add GammaToLinear and LinearToGamma (#60) 2023-02-26 13:10:59 +00:00
f0bce2983a
Fix CS1574 in ListExtensions
Count property is defined for IReadOnlyCollection<T> not IReadOnlyList<T>

Oops
2023-02-26 12:27:12 +00:00
ca1b1ccbf2
Add GreatestCommonFactor for built-in integer types 2023-02-26 12:25:50 +00:00
ba7329febd
[ci skip] Remove trailing whitespace on line 10 2023-02-26 00:38:56 +00:00
d9cf9c8db5
Add Nullable<T>.TryGetValue (resolves #61) 2023-02-26 00:35:22 +00:00
eadb66f470
Add MathUtility.ScaleRange 2023-02-05 14:28:42 +00:00
384ec3f61c
[ci skip] Set ContinuousIntegrationBuild to true for CI builds 2023-02-05 13:51:58 +00:00
35591b05e2
Add ReadOnlySpan<char> overload for TimeSpanParser
Also tidies up the code here to reduce complexity
2022-12-22 20:19:52 +00:00
94a841b2fc
Allow null input in TimeSpanParser.TryParse 2022-12-22 12:28:35 +00:00
fdc9e64cbe
Remove trailing whitespace in QuaternionExtensions 2022-12-22 12:28:18 +00:00
d14ecdec51
revert DebugType:None 2022-12-21 20:09:45 +00:00
b6d651a5c8
DebugType: None 2022-12-21 20:01:27 +00:00
a53cb12d5d
Use n&1 rather than n%2 for integer IsEven check 2022-12-06 01:22:48 +00:00
941f3acc56
[ci skip] Condense switch statement for IsPrime 2022-12-06 01:22:08 +00:00
9d6dbaaa23
Add Quaternion.ToAxisAngle and Quaternion.ToVector3 2022-12-06 01:08:35 +00:00
b60fdc495b
Add IReadOnlyList<T>.Slice 2022-12-01 13:51:30 +00:00
e02fd3b1b4
Add IReadOnlyList<T>.IndexOf 2022-12-01 12:28:33 +00:00
0ba7781462
Fix StackOverflow in FromCircle 2022-12-01 12:05:53 +00:00
c8d2a5cbec
Call .ConfigureAwait(false)
Yes I wrote true, this was a mistake.

https://media.tenor.com/YQv2NMgnGmoAAAAC/tom-hanks-forrest-gump.gif
2022-11-29 18:53:58 +00:00
8dfe6d5082
Fix CS8600 and CS8602 2022-11-29 17:26:03 +00:00
f3b40d30b3
Remove in modifier from SpanSplitEnumerator ctor 2022-11-29 17:23:14 +00:00
00d784eef0
Don't make exception throwing optional 2022-11-29 17:17:13 +00:00
7a1ecc6a01
Fix CA1305 violations 2022-11-29 17:13:26 +00:00
deb1f2edd8
Fix CA1602 violations 2022-11-29 17:12:39 +00:00
398b0c58b1
Fix CA2225 violations 2022-11-29 17:10:10 +00:00
c27334bdc8
Fix CA1307 violations 2022-11-29 16:51:48 +00:00
e38c384f4d
Suppress CA5394 2022-11-29 16:23:25 +00:00
1c0c06f89c
Only create Shared random for .NET < 6 2022-11-29 16:21:02 +00:00
0aeb6ff46d
Remove unused using directive 2022-11-29 16:18:38 +00:00
3c5cecf3ff
Fix CA1028 violation 2022-11-29 16:18:14 +00:00
2431a07a66
Un-nest SpanSplitEnumerator 2022-11-29 16:17:33 +00:00
f0781e5564
Directly return SpanSplitEnumerator instance 2022-11-29 16:12:16 +00:00
c9e473e86f
ConfigureAwait(true) on awaited methods 2022-11-29 16:11:06 +00:00
271305b056
Add .NET 7 target 2022-11-29 15:51:22 +00:00
53e8b2ff64
Repurpose Span<T>.Split to accept generic 2022-11-29 12:39:34 +00:00
ed8651172b
Add [ReadOnly]Span<char>.Split
This commit also migrates CountSubstring from StringExtensions to CharSpanExtensions
2022-11-28 02:59:46 +00:00
4af5a712f4
[ci skip] Remove blank line 2022-11-26 09:36:48 +00:00
9cce13727d
Add CountSubstring 2022-11-26 09:31:36 +00:00
3847d53120
Add more LINQ-esque methods
* IEnumerable<T>.CountWhereNot(Func<T, bool>)
* IEnumerable<T>.FirstWhereNot(Func<T, bool>)
* IEnumerable<T>.FirstWhereNotOrDefault(Func<T, bool>)
* IEnumerable<T>.LastWhereNot(Func<T, bool>)
* IEnumerable<T>.LastWhereNotOrDefault(Func<T, bool>)
* IEnumerable<T>.WhereNot(Func<T, bool>)
2022-07-30 23:53:35 +01:00
02765b8b19
Add IList<T>.Swap (#62) 2022-07-14 10:22:37 +01:00
3a5b017a72
Add Color.Deconstruct 2022-07-13 14:35:56 +01:00
c0395feba3
Add GetClosestConsoleColor (#66) 2022-07-13 14:18:12 +01:00
46bfa17b93
Add vector and point component rounding (#65) 2022-07-13 12:09:37 +01:00
efa5145836
Fix ulong.PopCount for .NET < Core 3.1 fallback
Previous implementation copied the uint version
2022-07-08 13:24:07 +01:00
b1eadf61f4
Add PopCount for built-in integer types 2022-07-08 13:09:34 +01:00
7231c41466
[ci skip] Fix source validation errors 2022-07-08 13:08:24 +01:00
2fb3eb77dd
Add DateTime(Offset).GetIso8601WeekOfYear 2022-07-05 21:26:45 +01:00
02cc897426
Add Point.IsOnLine (#64) 2022-06-29 17:55:04 +01:00
2e8626a32b
Add DirectoryInfo.Clear (#63) 2022-06-21 13:57:20 +01:00
3d896ea5d1
Add IList<T>.RemoveRange(Range) 2022-06-03 11:53:40 +01:00
08d84ed6a2
Add Circumference and Diameter properties to Sphere 2022-06-01 19:43:06 +01:00
221ee70f0c
Add Sphere/Cube.Volume property 2022-06-01 19:42:51 +01:00
76eb59f6c5
Add ctor overloads for Cuboid 2022-06-01 19:42:30 +01:00
165cdf16d0
Add predefined Cuboid and Sphere values 2022-06-01 19:42:11 +01:00
88dcbdc3c6
[ci skip] Refer to points as vertices 2022-06-01 19:41:43 +01:00
d91a3d2a8c
Add PointF.ToVector2 for .NET < 6 2022-06-01 19:41:13 +01:00
66a85d4f80
Fix incorrect wording in xmldoc 2022-06-01 19:40:06 +01:00
2c1da816ee
Add relational members to Sphere 2022-06-01 19:39:58 +01:00
0e62f233f0
Use auto-property for Polygon and Polyhedron
This ensures a new instance is created
2022-06-01 19:11:52 +01:00
f5af7b9513
Fix xmldoc wording in Polygon and Polyhedron
It's a class now, not a struct
2022-06-01 18:59:31 +01:00
2b8f763184
Add Quaternion.Multiply(Vector3)
Functions as an equivalent to Unity's Quaternion*Vector3 operator
2022-06-01 18:34:12 +01:00
ae82b92f23
Add Polyhedron class
Updates CHANGELOG to mention missing types
2022-06-01 18:33:30 +01:00
9d397b9538
Add Sphere struct 2022-06-01 18:32:34 +01:00
b8e6169c6f
Add Cuboid struct
NB: This struct has 7 auto-properties totalling 88 bytes. I feel there may be a way to calculate LocalFront__ given the center point, orientation, and size, but it's been a long day and I cannot think how to optimize this at the moment
2022-06-01 18:32:26 +01:00
0b3bf01fa0
Convert Polygon/F to class
This change also now refers to "Points" as "Vertices"
2022-06-01 18:30:48 +01:00
34b4777a8e
Use in modifier where logical to reduce overhead 2022-06-01 18:29:41 +01:00
09393029e8
Add separated argument constructor to Circle/F 2022-06-01 18:29:12 +01:00
b0cce087b3
Add additional ctor overloads for Ellipse/F 2022-06-01 17:05:25 +01:00
ea56f2be48
Add Line3D 2022-06-01 16:47:03 +01:00
5e835e10f1
Add Ellipse struct 2022-06-01 15:36:18 +01:00
2f74ef5f50
Initialize _points field as null 2022-06-01 15:35:53 +01:00
5f53495817
Add Circle/F conversions 2022-06-01 15:35:33 +01:00
e182b0f821
Fix invalid pattern match in CircleF 2022-06-01 15:33:44 +01:00
9c1714b419
Fix xmldoc for Line -> LineF conversion 2022-06-01 14:47:41 +01:00
e9b0ed08d4
Add primitive 2D structs to complement System.Drawing types 2022-06-01 13:46:22 +01:00
aca68cce72
[ci skip] Format csproj 2022-06-01 13:45:09 +01:00
f35f398d7f
Add conversions between Size(F)/Point(F)/Vector and Rect/Rectangle(F) 2022-05-28 14:19:46 +01:00
7ca206721b
Add MathUtility.InverseLerp (#60) 2022-05-23 10:33:52 +01:00
683e02cc2a
Add RoundUpToPowerOf2 2022-05-18 11:55:47 +01:00
d312d05f7a
Add vector tuple deconstruction 2022-05-16 10:30:55 +01:00
1bb1feb89b
Bump to 3.2.0 2022-05-16 10:19:53 +01:00
23e07b65b8
Add [ReadOnly]Span<T>.Count(Predicate<T>) 2022-05-12 13:52:04 +01:00
4d19e2f64c
Add Vector.With* methods (resolves #56) 2022-05-09 10:33:21 +01:00
d904daf431
Add Color.With* methods (resolves #55) 2022-05-09 10:01:03 +01:00
aa30abea93
Add Color.Inverted (#54) 2022-05-08 19:52:49 +01:00
f2ed6aebce
Fix endianness reversal for float/double 2022-05-07 23:43:19 +01:00
e6a858c7e7
Fix ulong.RotateRight left-shift 2022-05-07 23:37:40 +01:00
d405faf6e2
Add IsEmoji method
Emoji validation is performed by using a regex which is generated from Twemoji. Source: https://raw.githubusercontent.com/twitter/twemoji-parser/master/src/lib/regex.js
2022-05-07 23:37:14 +01:00
f257aebc28
Add .NET Standard 2.1 target, reintroduce Unity support 2022-05-05 18:00:38 +01:00
Oliver Booth
2d51f65834
Merge pull request #53 from oliverbooth/52-use-argumentnullexceptionthrowifnull-instead-of-is-null-check
Use ArgumentNullException.ThrowIfNull instead of is null check (resolves #52)
2022-05-04 10:54:23 +01:00
2a6bfadf58
Call ArgumentNullException.ThrowIfNull 2022-05-04 10:46:44 +01:00
adf2281f21
Add DisposeAll(Async) and ClearAndDisposeAll(Async) 2022-05-02 22:31:09 +01:00
7b8c344ddd
Remove unused namespace import 2022-05-02 22:27:31 +01:00
5d3a82a33a
Add IEnumerable<T>.For and ForEach (#50) 2022-05-01 22:25:37 +01:00
be845bccf2
Bump to 3.1.0 2022-05-01 22:05:15 +01:00
Oliver Booth
b16e5a9de9
3.0.0 Update (#43)
For a full list of changes, see [CHANGELOG.md](CHANGELOG.md)
2022-04-30 14:13:16 +01:00
6505299c00
Move Stream extensions to IO namespace (#7)
* Finalizes unit tests, 99% coverage
* Update CHANGELOG
2022-04-30 13:52:34 +01:00
842053d571
[ci skip] Remove trailing whitespace 2022-04-30 13:09:47 +01:00
a6139a5720
Migrate string extensions to appropriate namespaces (#7)
Introduces more tests
2022-04-30 13:08:39 +01:00
c13cc934b6
Move ListOfByteExtensions to IO namespace
Also introduces unit tests
2022-04-30 11:59:03 +01:00
8ba5a5ad19
Remove empty lines and unnecessary namespace imports 2022-04-30 11:33:48 +01:00