我有以下代码
struct Physics {
static let smallCoin : UInt32 = 0x1 << 1
static let smallCoin2 : UInt32 = 0x1 << 2
static let ground : UInt32 = 0x1 << 3
}
我想知道]的含义>
static let
UInt32 = 0x1 << 3
我有以下代码结构物理{static let smallCoin:UInt32 = 0x1 << 1 static let smallCoin2:UInt32 = 0x1 << 2 static let ground:UInt32 = 0x1 << 3} I ...
<<
是左移位运算符。您可以更好地以二进制形式可视化它: