예제 #1
0
 private static InvocationTranslator SimpleNameTranslator(string nameTarget)
 {
     return((type, method, parameters) =>
     {
         return $"{nameTarget}({InvocationParameterInfo.GetInvocationParameterList(parameters)})";
     });
 }
예제 #2
0
        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})");
        }
예제 #3
0
 private static string Atan(string typeName, string methodName, InvocationParameterInfo[] parameters)
 {
     return
         ($"{(parameters.Length < 2 ? "atan" : "atan2")}({InvocationParameterInfo.GetInvocationParameterList(parameters)})");
 }