Last active
January 12, 2024 23:31
-
-
Save dowoge/b5c4e638c48f8553e92512895789a60c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--return the target angle needed between segments to join them via a semi-circle (radius=pi) | |
local pi=math.pi | |
local deg=math.deg | |
local function CalculateAngle(SegmentLength,DistanceBetweenPoints) | |
local NSegments=(pi*DistanceBetweenPoints/2)/SegmentLength | |
local SegmentAngle=pi/NSegments | |
return deg(SegmentAngle) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment