Conversions

Description

static class Tinman.Terrain.Util.Conversions

Defines commonly used methods for converting between normalized values with different bit-depths.

Public / Methods

Convert_16_​To_24


[Pure]
public static method Convert_16_To_24 → (1)

value in : int32

The input value.

returns → int32

The output value. Will be -1 iff value in is less than zero.

Converts the given 16-bit value of range [0..65535] to a 24-bit value of range [0..16777215].

Convert_16_​To_30


[Pure]
public static method Convert_16_To_30 → (1)

value in : int32

The input value.

returns → int32

The output value. Will be -1 iff value in is less than zero.

Converts the given 16-bit value of range [0..65535] to a 30-bit value of range [0..1073741823].

Convert_16_​To_8


[Pure]
public static method Convert_16_To_8 → (1)

value in : int32

The input value.

returns → int32

The output value. Will be -1 iff value in is less than zero.

Converts the given 16-bit value of range [0..65535] to a 8-bit value of range [0..255].

Convert_24_​To_16


[Pure]
public static method Convert_24_To_16 → (1)

value in : int32

The input value.

returns → int32

The output value. Will be -1 iff value in is less than zero.

Converts the given 24-bit value of range [0..16777215] to a 16-bit value of range [0..65535].

Convert_24_​To_30


[Pure]
public static method Convert_24_To_30 → (1)

value in : int32

The input value.

returns → int32

The output value. Will be -1 iff value in is less than zero.

Converts the given 24-bit value of range [0..16777215] to a 30-bit value of range [0..1073741823].

Convert_24_​To_8


[Pure]
public static method Convert_24_To_8 → (1)

value in : int32

The input value.

returns → int32

The output value. Will be -1 iff value in is less than zero.

Converts the given 24-bit value of range [0..16777215] to a 8-bit value of range [0..255].

Convert_30_​To_16


[Pure]
public static method Convert_30_To_16 → (1)

value in : int32

The input value.

returns → int32

The output value. Will be -1 iff value in is less than zero.

Converts the given 30-bit value of range [0..1073741823] to a 16-bit value of range [0..65535].

Convert_30_​To_24


[Pure]
public static method Convert_30_To_24 → (1)

value in : int32

The input value.

returns → int32

The output value. Will be -1 iff value in is less than zero.

Converts the given 30-bit value of range [0..1073741823] to a 24-bit value of range [0..16777215].

Convert_30_​To_8


[Pure]
public static method Convert_30_To_8 → (1)

value in : int32

The input value.

returns → int32

The output value. Will be -1 iff value in is less than zero.

Converts the given 30-bit value of range [0..1073741823] to an 8-bit value of range [0..255].

Convert_8_​To_16


[Pure]
public static method Convert_8_To_16 → (1)

value in : int32

The input value.

returns → int32

The output value. Will be -1 iff value in is less than zero.

Converts the given 8-bit value of range [0..255] to a 16-bit value of range [0..65535].

Convert_8_​To_24


[Pure]
public static method Convert_8_To_24 → (1)

value in : int32

The input value.

returns → int32

The output value. Will be -1 iff value in is less than zero.

Converts the given 8-bit value of range [0..255] to a 24-bit value of range [0..16777215].

Convert_8_​To_30


[Pure]
public static method Convert_8_To_30 → (1)

value in : int32

The input value.

returns → int32

The output value. Will be -1 iff value in is less than zero.

Converts the given 8-bit value of range [0..255] to a 30-bit value of range [0..1073741823].