Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在这里,我尝试在 value 中插入一个值,GLKVector2Add但错误来自这一行中缺少的预期表达式。
GLKVector2Add
GLKVector2 self.position = GLKVector2Add({-200.695, 271},{-803.695, 0}); //Error - Expected expression
尝试创建“ GLKVector2”变量,设置它们,然后将它们作为参数传递给“ GLKVector2Add”。可能编译器根本不知道如何处理“{-200.695,271}”(浮点数和整数的混合)。
GLKVector2
您必须使用添加它们GLKVector2Make。
GLKVector2Make
因此,您的代码将是:
GLKVector2 position = GLKVector2Add( GLKVector2Make(-200.695, 271), GLKVector2Make(-803.695, 0));