Quick actions

cmd+k|ctrl+k

Navigation

Languages

Phenom Equation 2.0

Snippet info

Language

Lua

Visibility

public

Author

legacy-v1-16166

Created

2024-03-18T03:58:40.453413Z

Updated

2024-03-18T04:04:56.969833Z

-- derives an arc using a linear equation based on two points and an input distance
-- the points themselves though are based on generalized pre-determined datasets so this all a bit redundant
-- pointA/B: {minDist: number, maxDist: number, arc: number}
-- distance: number
local function getArc(pointA, pointB, distance)
    local slope = (pointA.arc - pointB.arc) / (pointB.maxDist - pointA.minDist)
    local intercept = pointA.arc - slope * points[1].minDist
    
    return slope * distance + intercept
end
INFO