private static InvocationTranslator SimpleNameTranslator(string nameTarget) { return((type, method, parameters) => { return $"{nameTarget}({InvocationParameterInfo.GetInvocationParameterList(parameters)})"; }); }
private static string Pow(string typeName, string methodName, InvocationParameterInfo[] parameters) { if (parameters.Length < 2) { return($"pow({InvocationParameterInfo.GetInvocationParameterList(parameters)})"); } return(parameters[0].FullTypeName.Contains("Vector") ? $"pow({InvocationParameterInfo.GetInvocationParameterList(parameters)})" : $"pow({parameters[0].Identifier}, (float){parameters[1].Identifier})"); }
private static string Atan(string typeName, string methodName, InvocationParameterInfo[] parameters) { return ($"{(parameters.Length < 2 ? "atan" : "atan2")}({InvocationParameterInfo.GetInvocationParameterList(parameters)})"); }