Struct StateHasher

Namespace
TDMaker.Core
Assembly
TDMaker.Core.dll

Stable FNV-1a value hashing with explicit byte order; never uses runtime object or string hashes.

public struct StateHasher
Inherited Members

Constructors

StateHasher(ulong)

Creates a hash accumulator with an explicit seed; FNV-1a uses 14695981039346656037UL.

public StateHasher(ulong seed)

Parameters

seed ulong

Properties

Value

Current hash value.

public ulong Value { get; }

Property Value

ulong

Methods

Add(bool)

Adds a boolean.

public void Add(bool item)

Parameters

item bool

Add(double)

Adds exact IEEE double bits.

public void Add(double item)

Parameters

item double

Add(int)

Adds a signed integer in little-endian order.

public void Add(int item)

Parameters

item int

Add(long)

Adds a signed long in little-endian order.

public void Add(long item)

Parameters

item long

Add(float)

Adds exact IEEE single bits.

public void Add(float item)

Parameters

item float

Add(string)

Adds string length and ordinal UTF-16 characters; null differs from empty.

public void Add(string item)

Parameters

item string

Add(ulong)

Adds an unsigned long in little-endian order.

public void Add(ulong item)

Parameters

item ulong

Add(Vec2)

Adds two exact coordinates.

public void Add(Vec2 item)

Parameters

item Vec2