manganese_serialization_kit v0.2.5 Manganese.SerializationKit.Structs.UnityVector2Int

A Unity vector2 value with integer :x and :y components.

Note that Unity structs are available in order to process the data in the API server, but most vector calculations occur in the environment simulation service.

This module can be used as an Ecto type for de/serialization when interacting with the database.

Link to this section Summary

Types

t()

A Unity vector2 int.

Functions

Deserialize a vector2 int from a map.

Deserialize a vector2 from a tuple.

Serialize a vector2 int to a map.

Serialize a vector2 int to a tuple.

The PostgreSQL composite type used to represent a vector2 int.

A vector2 int with zero values for all components.

Link to this section Types

Link to this type

t()
t() :: %Manganese.SerializationKit.Structs.UnityVector2Int{
  x: integer(),
  y: integer()
}

A Unity vector2 int.

Link to this type

t_external()
t_external() :: map()

Link to this type

t_internal()
t_internal() :: {integer(), integer()}

Link to this section Functions

Link to this function

from_map(map)
from_map(t_external()) :: t()

Deserialize a vector2 int from a map.

Link to this function

from_tuple(arg)
from_tuple(t_internal()) :: t()

Deserialize a vector2 from a tuple.

Link to this function

to_map(unity_vector2_int)
to_map(t()) :: t_external()

Serialize a vector2 int to a map.

Link to this function

to_tuple(unity_vector2_int)
to_tuple(t()) :: t_internal()

Serialize a vector2 int to a tuple.

The PostgreSQL composite type used to represent a vector2 int.

Link to this function

zero()
zero() :: t()

A vector2 int with zero values for all components.