So since I was bored, I decided to make this function, where given a starting point and an end point, it will give you the length of the hypotenuse, adjacent, and opposite, the angle in degrees, and the position where the adjacent meets the opposite.

Function:

```
function gettriangle(originalpos, endpos)
local triangleinfo = {}
function triangleinfo.new(hyp, adj, opp, angle, oppaadj)
local newtab = {}
newtab.Hyp = hyp
newtab.adj = adj
newtab.opp = opp
newtab.angle = angle
newtab.oppandadjpoint = oppaadj
return newtab
end
local hyp = (originalpos - endpos).Magnitude
local oppandadjpoint = Vector3.new(endpos.X, originalpos.Y, endpos.Z)
local adj = (originalpos - Vector3.new(endpos.X, originalpos.Y, endpos.Z)).Magnitude
local opp = (endpos - Vector3.new(endpos.X, originalpos.Y, endpos.Z)).Magnitude
local angle = math.deg(math.asin(opp/hyp))
return triangleinfo.new(hyp, adj, opp, angle, oppandadjpoint)
end
local tritable = gettriangle(workspace.Origin.Position, workspace.endpart.Position)
workspace.TrianglePoint.Position = tritable.oppandadjpoint
```

So would this be useful in anyway? And is my code efficient and accurate? (I’m relatively new to trigonometry)