Skip to content
This repository was archived by the owner on Jul 11, 2025. It is now read-only.
This repository was archived by the owner on Jul 11, 2025. It is now read-only.

No effect of one specialization of collides line and line in cdm math  #7

@jicoselene

Description

@jicoselene

cdm_math.hpp ligne 6809
template
constexpr void collides(line_T<T, line_representation::Points> l1,
line_T<T, line_representation::Points> l2,
vector2_T& intersection)
{
const T x1 = l1.p1.x;
const T x2 = l1.p2.x;
const T x3 = l2.p1.x;
const T x4 = l2.p2.x;
const T y1 = l1.p1.y;
const T y2 = l1.p2.y;
const T y3 = l2.p1.y;
const T y4 = l2.p2.y;

return {
	((x1 * y1 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * x4 - y3 * x4)) /
		((x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4)),
		((x1 * y1 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * x4 - y3 * x4)) /
		((x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4)) };

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions