print Math.sin(Math.pi / scale)
(scale is a Double)
I get errors like:
Cannot apply SLASH to Double.
Cannot find a definition for "pi" in "Math".
Do I need to do some sort of type casting or overloading that I'm overlooking?
class X
def main is shared
scale = 1.0f
print Math.sin(Math.pI / scale)
pi = Math.pI
"""
MathTest.cobra
"""
class MathTest
shared
var _c as Double
def main
_c = 35.12 to Double
d = 1.456 to Double
print _c / d
Users browsing this forum: No registered users and 4 guests