On this page

types

Functions for checking Defold userdata types.

Functions

types.is_vector(var: unknown): boolean

Check if passed type is vector.

Parameters

  • var: unknown — Variable to check type

Returns

  • result: boolean — True if passed type is vector

types.is_matrix4(var: unknown): boolean

Check if passed type is matrix4.

Parameters

  • var: unknown — Variable to check type

Returns

  • result: boolean — True if passed type is matrix4

types.is_vector3(var: unknown): boolean

Check if passed type is vector3.

Parameters

  • var: unknown — Variable to check type

Returns

  • result: boolean — True if passed type is vector3

types.is_vector4(var: unknown): boolean

Check if passed type is vector4.

Parameters

  • var: unknown — Variable to check type

Returns

  • result: boolean — True if passed type is vector4

types.is_quat(var: unknown): boolean

Check if passed type is quaternion.

Parameters

  • var: unknown — Variable to check type

Returns

  • result: boolean — True if passed type is quaternion

types.is_hash(var: unknown): boolean

Check if passed type is hash.

Parameters

  • var: unknown — Variable to check type

Returns

  • result: boolean — True if passed type is hash

types.is_url(var: unknown): boolean

Check if passed type is URL.

Parameters

  • var: unknown — Variable to check type

Returns

  • result: boolean — True if passed type is URL