Skip to content

Add math.cot function#2400

Open
Akabenko wants to merge 1 commit intoFacepunch:masterfrom
Akabenko:patch-3
Open

Add math.cot function#2400
Akabenko wants to merge 1 commit intoFacepunch:masterfrom
Akabenko:patch-3

Conversation

@Akabenko
Copy link
Contributor

@Akabenko Akabenko commented Nov 28, 2025

Returns cotangent of number. Useful for calculations of scaling factor using FOV.
Usage example:

local viewSetup = render.GetViewSetup()
local fov = viewSetup.fov
local factor = math.cot( math.rad( fov * 0.5 ) )

Returns cotangent of number. Useful for calculations of scaling factor using FOV.
```lua
local viewSetup = render.GetViewSetup()
local fov = viewSetup.fov
local factor = math.cot( math.rad( fov * 0.5 ) )
```
@robotboy655 robotboy655 added the Addition The pull request adds new functionality. label Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Addition The pull request adds new functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants