Skip to content

Instantly share code, notes, and snippets.

@BobGneu
Created May 16, 2014 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BobGneu/55fc893d379493b65dfd to your computer and use it in GitHub Desktop.
Save BobGneu/55fc893d379493b65dfd to your computer and use it in GitHub Desktop.
Example of callback usage. Includes pulling arguments out and assigning the return value.
void Flathead::Math_RadiansToDegrees(const FunctionCallbackInfo<Value>& args)
{
double value;
HandleScope handle_scope(args.GetIsolate());
value = args[0]->NumberValue();
args.GetReturnValue().Set(FMath::RadiansToDegrees(value));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment