<commit_before>/**
 *  AffineShapes
 *
 *  @copyright 2017, <NAME>
 *  @module AffineShapes
 */

import IntersectionArgs from "./IntersectionArgs.js";

/**
 * @namespace
 */
const AffineShapes = {};

/**
 *  quadraticBezier
 *  @param {module:kld-intersections.Point2D} p1
 *  @param {module:kld-intersections.Point2D} p2
 *  @param {module:kld-intersections.Point2D} p3
 *  @returns {module:kld-intersections.IntersectionArgs}
 */
AffineShapes.quadraticBezier = function(p1, p2, p3) {
    return new IntersectionArgs("Bezier2", [p1, p2, p3]);
};

/**
 *  cubicBezier
 *
 *  @param {module:kld-intersections.Point2D} p1
 *  @param {module:kld-intersections.Point2D} p2
 *  @param {module:kld-intersections.Point2D} p3
 *  @param {module:kld-intersections.Point2D} p4
 *  @returns {module:kld-intersections.IntersectionArgs}
 */
AffineShapes.cubicBezier = function(p1, p2, p3, p4) {
    return new IntersectionArgs("Bezier3", [p1, p2, p3, p4]);
};

/**
 *  circle
 *
 *  @param {module:kld-intersections.Point2D} center
 *  @param {number} radius
 *  @returns {module:kld-intersections.IntersectionArgs}
 */
AffineShapes.circle = function(center, radius) {
    return new IntersectionArgs("Circle", [center, radius]);
};

/**
 *  ellipse
 *
 *  @param {module:kld-intersections.Point2D} center
 *  @param {number} radiusX
 *  @param {number} radiusY
 *  @returns {module:kld-intersections.IntersectionArgs}
 */
AffineShapes.ellipse = function(center, radiusX, radiusY) {
    return new IntersectionArgs("Ellipse", [center, radiusX, radiusY]);
};

/**
 * arc
 *
 * @param {module:kld-intersections.Point2D} center
 * @param {number} radiusX
 * @param {number} radiusY
 * @param {number} startRadians
 * @param {number} endRadians
 * @returns {module:kld-intersections.IntersectionArgs}
 */
AffineShapes.arc = function(center, radiusX, radiusY, startRadians, endRadians) {
    return new IntersectionArgs("Arc", [center, radiusX, radiusY, startRadians, endRadians]);
};

/**
 *  line
 *
 *  @param {module:kld-intersections.Point2D} p1
 *  @param {module:kld-intersections.Point2D} p2
 *  @returns {module:kld-intersections.IntersectionArgs}
 */
AffineShapes.line = function(p1, p2) {
    return new IntersectionArgs("Line", [p1, p2]);
};

/**
 *  path
 *
 *  @param {Array<module:kld-intersections.AffineShapes>} segments
 *  @returns {module:kld-intersections.IntersectionArgs}
 */
AffineShapes.path = function(segments) {
    return new IntersectionArgs("Path", [segments]);
};

/**
 *  polygon
 *
 *  @param {Array<module:kld-intersections.Point2D>} points
 *  @returns {module:kld-intersections.IntersectionArgs}
 */
AffineShapes.polygon = function(points) {
    return new IntersectionArgs("Polygon", [points]);
};

/**
 *  polyline
 *
 *  @param {Array<module:kld-intersections.Point2D>} points
 *  @returns {module:kld-intersections.IntersectionArgs}
 */
AffineShapes.polyline = function(points) {
    return new IntersectionArgs("Polyline", [points]);
};

/**
 *  rectangle
 *<commit_msg>Fix path creation in AffineShapes<commit_after>/**
 *  AffineShapes
 *
 *  @copyright 2017, <NAME>sey
 *  @module AffineShapes
 */

import IntersectionArgs from "./IntersectionArgs.js";

/**
 * @namespace
 */
const AffineShapes = {};

/**
 *  quadraticBezier
 *  @param {module:kld-intersections.Point2D} p1
 *  @param {module:kld-intersections.Point2D} p2
 *  @param {module:kld-intersections.Point2D} p3
 *  @returns {module:kld-intersections.IntersectionArgs}
 */
AffineShapes.quadraticBezier = function(p1, p2, p3) {
    return new IntersectionArgs("Bezier2", [p1, p2, p3]);
};

/**
 *  cubicBezier
 *
 *  @param {module:kld-intersections.Point2D} p1
 *  @param {module:kld-intersections.Point2D} p2
 *  @param {module:kld-intersections.Point2D} p3
 *  @param {module:kld-intersections.Point2D} p4
 *  @returns {module:kld-intersections.IntersectionArgs}
 */
AffineShapes.cubicBezier = function(p1, p2, p3, p4) {
    return new IntersectionArgs("Bezier3", [p1, p2, p3, p4]);
};

/**
 *  circle
 *
 *  @param {module:kld-intersections.Point2D} center
 *  @param {number} radius
 *  @returns {module:kld-intersections.IntersectionArgs}
 */
AffineShapes.circle = function(center, radius) {
    return new IntersectionArgs("Circle", [center, radius]);
};

/**
 *  ellipse
 *
 *  @param {module:kld-intersections.Point2D} center
 *  @param {number} radiusX
 *  @param {number} radiusY
 *  @returns {module:kld-intersections.IntersectionArgs}
 */
AffineShapes.ellipse = function(center, radiusX, radiusY) {
    return new IntersectionArgs("Ellipse", [center, radiusX, radiusY]);
};

/**
 * arc
 *
 * @param {module:kld-intersections.Point2D} center
 * @param {number} radiusX
 * @param {number} radiusY
 * @param {number} startRadians
 * @param {number} endRadians
 * @returns {module:kld-intersections.IntersectionArgs}
 */
AffineShapes.arc = function(center, radiusX, radiusY, startRadians, endRadians) {
    return new IntersectionArgs("Arc", [center, radiusX, radiusY, startRadians, endRadians]);
};

/**
 *  line
 *
 *  @param {module:kld-intersections.Point2D} p1
 *  @param {module:kld-intersections.Point2D} p2
 *  @returns {module:kld-intersections.IntersectionArgs}
 */
AffineShapes.line = function(p1, p2) {
    return new IntersectionArgs("Line", [p1, p2]);
};

/**
 *  path
 *
 *  @param {Array<module:kld-intersections.AffineShapes>} segments
 *  @returns {module:kld-intersections.IntersectionArgs}
 */
AffineShapes.path = function(segments) {
    return new IntersectionArgs("Path", segments);
};

/**
 *  polygon
 *
 *  @param {Array<module:kld-intersections.Point2D>} points
 *  @returns {module:kld-intersections.IntersectionArgs}
 */
AffineShapes.polygon = function(points) {
    return new IntersectionArgs("Polygon", [points]);
};

/**
 *  polyline
 *
 *  @param {Array<module:kld-intersections.Point2D>} points
 *  @returns {module:kld-intersections.IntersectionArgs}
 */
AffineShapes.polyline = function(points) {
    return new IntersectionArgs("Polyline", [points]);
};

/**
 *  rectangle
 *
{'fraction_non_alphanumeric': 0.15410218006323848, 'fraction_numerical': 0.01564320186387086, 'mean_word_length': 4.675165250236072, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4469432', 'n_tokens_mistral': 2183, 'n_tokens_neox': 2166, 'n_words': 380}