MCPcopy Create free account
hub / github.com/dfranx/SHADERed / isPointOnLine

Function isPointOnLine

src/SHADERed/Objects/DebugInformation.cpp:330–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328 return a < 0 ? (s <= 0 && s + t >= a) : (s >= 0 && s + t <= a);
329}
330bool isPointOnLine(glm::vec2 p, glm::vec2 p0, glm::vec2 p1)
331{
332 float v = glm::distance(p0, p) + glm::distance(p, p1) - glm::distance(p0, p1);
333 return -0.01 < v && v < 0.01;
334}
335
336namespace ed {
337 DebugInformation::DebugInformation(ObjectManager* objs, RenderEngine* renderer, MessageStack* msgs)

Callers 1

ExecuteGeometryShaderMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected