value · System

Int8

public value Int8 : ISignedNumber<i8>, IHashable<i8>, IComparable<i8>, IToString
Tipo
value
Espacio de nombres
System
Ensamblado
System.Core
Acceso
public, miembros de i8
Archivo fuente
Primitives.ant

Herencia

Interfaces
ISignedNumber<TSelf> IHashable<TSelf> IComparable<TSelf> IToString
Todas las interfaces
IComparable<TSelf> IHashable<TSelf> INumber<TSelf> ISignedNumber<TSelf> IToString

Propiedades

static i8 Zero { get; }
#

static read-only

static i8 One { get; }
#

static read-only

static i8 NegativeOne { get; }
#

static read-only

Métodos

static FromF64(f64 value) : i8
#

static

static ToF64(i8 value) : f64
#

static

ToString(str format) : str
#

As text by a format: D, X, B, N, F, E, P, G and a precision (255.ToString("X4") is "00FF").

ToString() : str
#
Hash() : u64
#
Equals(i8 other) : bool
#
CompareTo(i8 other) : i32
#

Constantes

const i8 MinValue = -128
#

The smallest i8.

const i8 MaxValue = 127
#

The largest i8.

Código fuente

Int8 en Antril, descompilado a partir de su Larva HIR.

System.Int8.ant
// System.Int8 — System.Core (decompiled from Larva HIR)

into namespace System
{
	[Primitive("i8")]
	public value Int8 : ISignedNumber<i8>, IHashable<i8>, IComparable<i8>, IToString
	{
		public:
			/// The smallest i8.
			const i8 MinValue = -128;

			/// The largest i8.
			const i8 MaxValue = 127;

			[Inline]
			static FromF64(f64 value) : i8 => (i8)value;

			[Inline]
			static ToF64(i8 value) : f64 => value;

			/// As text by a format: D, X, B, N, F, E, P, G and a precision (`255.ToString("X4")` is "00FF").
			ToString(str format) : str => NumberFormat.FormatInteger((u8)this, 8, true, format);

			ToString() : str => Number.Format(this);

			Hash() : u64 => (u8)this;

			Equals(i8 other) : bool => this == other;

			CompareTo(i8 other) : i32 => this < other ? -1 : this > other ? 1 : 0;

			static i8 Zero
			{
				get => 0;
			}

			static i8 One
			{
				get => 1;
			}

			static i8 NegativeOne
			{
				get => -1;
			}
	}
}
Esc