Skip to content

Handle overloaded functions like Angle #7

@luttje

Description

@luttje

Angle supports two ways of calling the function: https://wiki.facepunch.com/gmod/Global.Angle

Sadly we currently only parse one way, which can result in this error:
image

If the wiki was consistent we could automatically use @overload, but the alternative usage is described in a form that seems non-trivial to parse:

<args>
		<arg name="pitch" type="number" default="0">The pitch value of the angle.


If this is an <page>Angle</page>, this function will return a copy of the given angle.


If this is a <page>string</page>, this function will try to parse the string as a angle. If it fails, it returns a 0 angle.
(See examples)</arg>
		<arg name="yaw" type="number" default="0">The yaw value of the angle.</arg>
		<arg name="roll" type="number" default="0">The roll value of the angle.</arg>
	</args>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is neededlow-priorityNot going to be worked on soon, but nice to improve in the future

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions