triangular

fun triangular(x1: Float, y1: Float, x2: Float, y2: Float, x3: Float, y3: Float): Hitbox2D

Creates a triangular hitbox given its three vertices.

Return

A Hitbox2D representing the triangle.

Parameters

x1

The x coordinate of the first vertex.

y1

The y coordinate of the first vertex.

x2

The x coordinate of the second vertex.

y2

The y coordinate of the second vertex.

x3

The x coordinate of the third vertex.

y3

The y coordinate of the third vertex.