Syntax
Functions are declared with fn
.
A function f
with no parameters and no return type has the form:
|
|
Function parameters are comma-separated, and declared between the ()
.
They have the form name : type
.
|
|
Functions that return a value declare the function’s return type between the parameter list and the function body.
The return type of this function is vec3f
:
|
|