我不明白为什么这段代码是错误的,错误信息是:
error: '}' expected but '.' found.
在线的
this.tX = cX
代码:
class Quaternion {
private var tX: Float = 0
private var tY: Float = 0
private var tZ: Float = 0
private var tW: Float = 1
def this(cX: Float, cY: Float, cZ: Float, cW: Float) {
this.tX = cX
this.tY = cY
this.tZ = cZ
this.tW = cW
}
...
请帮我解决我可能明显的错误。