# The Official Blog of Patcoola  Im just a dude watching over my parents,
and trying to make cartoons and video games from home.

## R&D: Math Kit Plug-in for Construct 2

, By Patcoola I have created a math kit for the game creation program Construct 2, this plug-in provides useful game related functions.

More functions are being considered for the future, however, I’m not in a hurry.

Updated 2015-08-25:

• Added Expression: X to Absolute X
• Added Expression: Y to Absolute Y

Conditions

Square to Square

Test if the area of two squares overlap, does not support rotation.

Circle to Circle

Test if the area of two circles overlap.

Square Area

Test an X,Y position if it is within a square area.

Test an X,Y position if it is within a quadrilateral area.

Trilateral Area

Test an X,Y position if it is within a trilateral area.

Circle Area

Test an X,Y position if it is within a circular area.

Actions

Angle 2 Degrees

Converts Construct’s angle to degrees.

Degrees To Direction

Determines the direction from two positions.
Options: O’Clock, 4 Way Direction, 8 Way Direction

Get Circumference

Get the X,Y position of the circumference.

Get Distance

Get the distance between to positions.

Get Degrees of Positions

Get the degrees related to the direction from two positions.

Action Expressions

result

Returns the result of an action which returns one result.

result_x

Returns the first result of an action which returns more than one value.

result_y

Returns the second result of an action which returns more than one value.

Expressions

Number format; Converts a number to a string, adds zeros to the beginning.

Round To

Round to the nearest multiple of a given number.

Floor To

Floor to a multiple of a given number.

Ceil To

Ceil to a multiple of a given number.

Sum

Calculates the total sum of a string or array of numbers.

Lowest

Finds the lowest value of a string or array of numbers.

Highest

Finds the highest value of a string or array of numbers.

Average

Calculates the average from a string or array of numbers.

X to Absolute X

Converts the X position to the absolute X of the canvas.

Y to Absolute Y

Converts the Y position to the absolute Y of the canvas.