私はこの方法を書きました:
public def getXScaleFactor(panelWidth: Int): Double = {
return (panelWidth / (samplesContainer[0].length.asInstanceOf[Double]))
}
コンパイルに問題があります:
[error] ./src/main/scala/Controllers/TrackController.scala:85: ';' expected but 'def' found.
[error] public def getXScaleFactor(panelWidth: Int): Double {
[error] ^
このコードのどこが間違っていますか?