**Description:**

Math Pack #1 provides 24 functions and number series, all in a fast DLL form. This was designed for more advanced GM users who do not want to have to make their own versions of simple math functions.

**Download (Geocities)**

**List of functions:**

cross_product_x(x1, y1, z1, x2, y2, z2) - Returns the X axis length of the result vector of the cross product of (x1, y1, z1) and (x2, y2, z2).

cross_product_y(x1, y1, z1, x2, y2, z2) - Returns the Y axis length of the result vector of the cross product of (x1, y1, z1) and (x2, y2, z2).

cross_product_z(x1, y1, z1, x2, y2, z2) - Returns the Z axis length of the result vector of the cross product of (x1, y1, z1) and (x2, y2, z2).

dot_2d(x1, y1, x2, y2) - Returns the result of the dot product of (x1, y1) and (x2, y2).

dot_3d(x1, y1, z1, x2, y2, z2) - Returns the result of the dot product of (x1, y1, z1) and (x2, y2, z2).

quadratic_max(a, b, c) - Returns the maximum of the two results of the quadratic described by ax2 + bx + c = 0.

quadratic_min(a, b, c) - Returns the minimum of the two results of the quadratic described by ax2 + bx + c = 0.

cotan(x) - Returns the cotangent (1 / tangent) of x.

arccot(x) - Returns the inverse cotangent of x.

factorial(n) - Returns n! (all integers under x multiplied).

gcd(n1, n2) - Returns the Greatest Common Divisor (GCD) of n1 and n2. This function rounds the numbers to integers, then works with their absolute value.

lcm(n1, n2) - Returns the Least Common Multiple (LCM) of n1 and n2. This function rounds the numbers to integers, then works with their absolute value.

gold(x) - Returns the Y componet of the Golden Function for X.

bernoulli(n) - Returns the nth Bernoulli number.

fibonacci(n) - Returns the nth Fibonacci number.

perrin(n) - Returns the nth Perrin number.

line_line_collision_check(x1, y1, x2, y2, x3, y3, x4, y4) - Returns whether the line between (x1, y1) and (x2, y2) collides with the line between (x3, y3) and (x4, y4).

line_line_collision_x(x1, y1, x2, y2, x3, y3, x4, y4) - Returns the X value of the collision between lines ((x1, y1), (x2, y2)) and ((x3, y3), (x4, y4)).

line_line_collision_y(x1, y1, x2, y2, x3, y3, x4, y4) - Returns the Y value of the collision between lines ((x1, y1), (x2, y2)) and ((x3, y3), (x4, y4)).

line_circle_collision_check(x1, y1, x2, y2, centerx, centery, radius) - Returns whether the line ((x1, y1), (x2, y2)) collides with the circle at (centerx, centery) with a radius of radius.

line_circle_collision_x1(x1, y1, x2, y2, centerx, centery, radius) - Returns the X value of the first collision between the line ((x1, y1), (x2, y2)) and the circle at (centerx, centery) with a radius of radius.

line_circle_collision_y1(x1, y1, x2, y2, centerx, centery, radius) - Returns the Y value of the first collision between the line ((x1, y1), (x2, y2)) and the circle at (centerx, centery) with a radius of radius.

line_circle_collision_x2(x1, y1, x2, y2, centerx, centery, radius) - Returns the X value of the second collision between the line ((x1, y1), (x2, y2)) and the circle at (centerx, centery) with a radius of radius.

line_circle_collision_y2(x1, y1, x2, y2, centerx, centery, radius) - Returns the Y value of the second collision between the line ((x1, y1), (x2, y2)) and the circle at (centerx, centery) with a radius of radius.

**Edited by Gamer3D, 26 June 2007 - 04:14 PM.**