

_invert_permutation() - Generates a permutation array to invert a given permutation array._array_reverse() - Reverses the order of elements in an array._array_min() - Returns the minimum value (or the index of the minimum value) in an array._array_max() - Returns the maximum value (or the index of the maximum value) in an array.An optional argument allows the search to begin from a specified index. _array_index() - Finds the first index at which a specified value occurs in an array (or -1 if not found)._array_function() - Applies a given function to every element of a given array, and returns an array of results._array_count() - Counts the number of occurrences of a specified value in an array._round() - Generalized rounding function which accepts a step size argument.Ĭommon array functions (such as searching and counting).This is the inverse of _natural_to_natural_pair(). _natural_pair_to_natural() -Maps an ordered pair of natural numbers to a unique natural number using the Cantor pairing function.This is the inverse of _natural_pair_to_natural(). _natural_to_natural_pair() - Maps a natural number to a unique ordered pair of natural numbers using the inverse Cantor pairing function.This is the inverse of `_integer_pair_to_natural`. _natural_to_integer_pair() -Maps a natural number to a unique ordered pair of integers (by composing _nautral_to_integer() on _natural_to_natural_pair()).This is the inverse of _integer_to_natural(). _natural_to_integer() - Maps a natural number to a unique integer using the zig-zagging bijection from (0, 1, 2, 3, 4._k_tuples() - Generates an array of all possible base- b k-tuples, in ascending (or descending) order.This is the inverse of _natural_to_integer(). _integer_to_natural() - Maps an integer to a unique natural number using the zig-zagging bijection from (0, 1, -1, 2, -2.This is the inverse of _natural_to_integer_pair(). _integer_pair_to_natural() - Maps an ordered pair of integers to a unique natural number (by composing _nautral_pair_to_natural() on _integer_to_natural())._frac() - Generalized fractional part function which accepts a step size argument.

_floor() - Generalized floor function which accepts a step size argument._factorial() - Calculates the factorial ( n!) of a nonnegative integer._decimal_to_base() - Converts a number from decimal to an array of base- b digits._ceil() - Generalized ceiling function which accepts a step size argument._base_to_decimal() - Converts a number from an array of base- b digits to decimal.For example, the various pairing and inverse pairing functions can be used to store pairs of numbers as single numbers in data structures (like stacks and queues) and then recovered. The following is a brief description of the included functions, divided into rough categories.Ī variety of scripts dealing with sequences, functions, and sets, which may have some uses for managing data structures. The scripts included in the package are reasonably well-documented within the source code. Some include methods, which are always defined in the object's Create event. All object names begin with the obj_ prefix. All function names begin with an underscore in order to distinguish them from built-in functions. Most functions are standalone and are meant to be taken à la carte, but some of the more mathematically complicated functions depend on other scripts, indicated in a tag.
#Gamemaker studio download ini files code
I encourage you to download it, use it in your own projects, and modify the source code as much as you like.Įach script in this package defines a single function.
#Gamemaker studio download ini files for free
I've written these functions for my own use over the years, and I expect to add more over time.Īll source code is available for free at my GitHub page, released under the MIT license.

This is collection of general utility and mathematical objects and functions for GameMaker Studio 2 (Version 2.3) in the form of a local asset package.
