Pow Sqrt ....
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -57,6 +57,27 @@ public readonly partial record struct Area
|
||||
public Area AddKiloMetersSquared(double value) => new(_Value + AreaConv.KiloMetersSquared.To(value));
|
||||
}
|
||||
|
||||
public static class AreaSqrtExtension
|
||||
{
|
||||
// === ReadOnlySpan
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static void Sqrt(
|
||||
this ReadOnlySpan<Area> units, Span<Length> destination) => units.Sqrt<Area, Length>(destination);
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static void Sqrt(
|
||||
this ReadOnlySpan<Area?> units, Span<Length?> destination) => units.Sqrt<Area, Length>(destination);
|
||||
|
||||
// === Array ===
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]public static Length[] Sqrt(this Area[] units) => units.Sqrt<Area, Length>();
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static Length?[] Sqrt(this Area?[] units) => units.Sqrt<Area, Length>();
|
||||
|
||||
// === List<T> ===
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static List<Length> Sqrt(this List<Area> units) => units.Sqrt<Area, Length>();
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static List<Length?> Sqrt(this List<Area?> units) => units.Sqrt<Area, Length>();
|
||||
|
||||
// === IEnumerable<T> ===
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static IEnumerable<Length> Sqrt(this IEnumerable<Area> units) => units.Sqrt<Area, Length>();
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static IEnumerable<Length?> Sqrt(this IEnumerable<Area?> units) => units.Sqrt<Area, Length>();
|
||||
}
|
||||
|
||||
internal readonly struct AreaConv
|
||||
{
|
||||
private AreaConv(double multiplicator) => this.Multiplicator = multiplicator;
|
||||
|
||||
@@ -83,6 +83,52 @@ public readonly partial record struct Length
|
||||
}
|
||||
}
|
||||
|
||||
public static class LengthPowExtension
|
||||
{
|
||||
// === ReadOnlySpan
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static void Pow(
|
||||
this ReadOnlySpan<Length> units, Span<Area> destination) => units.Pow<Length, Area>(destination);
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static void Pow(
|
||||
this ReadOnlySpan<Length?> units, Span<Area?> destination) => units.Pow<Length, Area>(destination);
|
||||
|
||||
// === Array ===
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static Area[] Pow(this Length[] units) => units.Pow<Length, Area>();
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static Area?[] Pow(this Length?[] units) => units.Pow<Length, Area>();
|
||||
|
||||
// === List<T> ===
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static List<Area> Pow(this List<Length> units) => units.Pow<Length, Area>();
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static List<Area?> Pow(this List<Length?> units) => units.Pow<Length, Area>();
|
||||
|
||||
// === IEnumerable<T> ===
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static IEnumerable<Area> Pow(this IEnumerable<Length> units) => units.Pow<Length, Area>();
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static IEnumerable<Area?> Pow(this IEnumerable<Length?> units) => units.Pow<Length, Area>();
|
||||
|
||||
|
||||
|
||||
|
||||
// === ReadOnlySpan
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static void Pow3(
|
||||
this ReadOnlySpan<Length> units, Span<Volume> destination) => units.Pow3<Length, Volume>(destination);
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static void Pow3(
|
||||
this ReadOnlySpan<Length?> units, Span<Volume?> destination) => units.Pow3<Length, Volume>(destination);
|
||||
|
||||
// === Array ===
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static Volume[] Pow3(this Length[] units) => units.Pow3<Length, Volume>();
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static Volume?[] Pow3(this Length?[] units) => units.Pow3<Length, Volume>();
|
||||
|
||||
// === List<T> ===
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static List<Volume> Pow3(this List<Length> units) => units.Pow3<Length, Volume>();
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static List<Volume?> Pow3(this List<Length?> units) => units.Pow3<Length, Volume>();
|
||||
|
||||
// === IEnumerable<T> ===
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static IEnumerable<Volume> Pow3(this IEnumerable<Length> units) => units.Pow3<Length, Volume>();
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static IEnumerable<Volume?> Pow3(this IEnumerable<Length?> units) => units.Pow3<Length, Volume>();
|
||||
}
|
||||
|
||||
|
||||
internal readonly struct LengthConv
|
||||
{
|
||||
|
||||
@@ -35,6 +35,29 @@ public readonly partial record struct Voltage
|
||||
public Voltage AddMegaVolts(double value) => new(_Value + VoltageConv.MegaVolts.To(value));
|
||||
}
|
||||
|
||||
public static class VolumeSqrtExtension
|
||||
{
|
||||
// === ReadOnlySpan
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static void Sqrt3(
|
||||
this ReadOnlySpan<Volume> units, Span<Length> destination) => units.Sqrt3<Volume, Length>(destination);
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static void Sqrt3(
|
||||
this ReadOnlySpan<Volume?> units, Span<Length?> destination) => units.Sqrt3<Volume, Length>(destination);
|
||||
|
||||
// === Array ===
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static Length[] Sqrt3(this Volume[] units) => units.Sqrt3<Volume, Length>();
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static Length?[] Sqrt3(this Volume?[] units) => units.Sqrt3<Volume, Length>();
|
||||
|
||||
// === List<T> ===
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static List<Length> Sqrt3(this List<Volume> units) => units.Sqrt3<Volume, Length>();
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static List<Length?> Sqrt3(this List<Volume?> units) => units.Sqrt3<Volume, Length>();
|
||||
|
||||
// === IEnumerable<T> ===
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static IEnumerable<Length> Sqrt3(this IEnumerable<Volume> units) => units.Sqrt3<Volume, Length>();
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static IEnumerable<Length?> Sqrt3(this IEnumerable<Volume?> units) => units.Sqrt3<Volume, Length>();
|
||||
}
|
||||
|
||||
internal readonly struct VoltageConv
|
||||
{
|
||||
private VoltageConv(double multiplicator) => this.Multiplicator = multiplicator;
|
||||
|
||||
Reference in New Issue
Block a user