D
D
dastan12016-04-19 19:47:11
Swift
dastan1, 2016-04-19 19:47:11

Swift math signs?

How to calculate square root or exponentiate in swift?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2016-04-20
@dastan1

#if os(OSX) || os(iOS)
    import Darwin
#elseif os(Linux)
    import Glibc
#endif

print(sqrt(9.0))   // 3.0
print(pow(3.0, 3)) // 27.0

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question