extends Node

class_name Cutter

static func circleCutter(num_sides = 7, perimerter_length = 0.2) -> PackedVector2Array:
	var line_length: float = perimerter_length/num_sides
	var line_angle: float = 360.0/num_sides
	var current_angle: float = 0.0
	
	var vectors: PackedVector2Array
	
	for i in num_sides:
		var vector: Vector2 = Vector2.ZERO
		
		if i == 0:
			current_angle += line_angle
			vector = Vector2(line_length * cos(deg_to_rad(current_angle)), line_length * sin(deg_to_rad(current_angle)))
			vectors.append(vector)
		else:
			current_angle += line_angle
			vector = Vector2(vectors[i-1].x + line_length * cos(deg_to_rad(current_angle)), vectors[i-1].y + line_length * sin(deg_to_rad(current_angle)))
			vectors.append(vector)
	
	return vectors
