mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 12:38:24 +01:00
38 lines
1.3 KiB
C#
38 lines
1.3 KiB
C#
// <auto-generated /> - edit Vector.format.tt to modify
|
|
#nullable enable
|
|
|
|
namespace Brutal.Numerics;
|
|
|
|
public partial struct bool4 : ISpanFormattable, IUtf8SpanFormattable
|
|
{
|
|
/// <inheritdoc />
|
|
public readonly override string ToString()
|
|
{
|
|
return ToString("G", CultureInfo.CurrentCulture);
|
|
}
|
|
|
|
/// <inheritdoc cref="Vector4.ToString(string?)" />
|
|
public readonly string ToString(string? format)
|
|
{
|
|
return ToString(format, CultureInfo.CurrentCulture);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public readonly string ToString(string? format, IFormatProvider? formatProvider)
|
|
{
|
|
var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator;
|
|
return $"<{X.ToString()}{separator} {Y.ToString()}{separator} {Z.ToString()}{separator} {W.ToString()}>";
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public readonly bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider)
|
|
{
|
|
return StringHelpers.TryFormat<bool4, bool>(this, destination, out charsWritten, format, provider);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public readonly bool TryFormat(Span<byte> destination, out int bytesWritten, ReadOnlySpan<char> format, IFormatProvider? provider)
|
|
{
|
|
return StringHelpers.TryFormat<bool4, bool>(this, destination, out bytesWritten, format, provider);
|
|
}
|
|
}
|