You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
364 B
25 lines
364 B
import Cocoa
|
|
|
|
var greeting = "Hello, playground"
|
|
|
|
print(greeting)
|
|
|
|
|
|
var posx : Float = 140.0
|
|
var posy : Float = 290.0
|
|
|
|
type(of: posx)
|
|
type(of: 100)
|
|
|
|
var calc = posx/100.0
|
|
type(of: calc)
|
|
calc.round(.toNearestOrAwayFromZero)
|
|
|
|
var calc2 = posy/100.0
|
|
type(of: calc2)
|
|
calc2.round(.toNearestOrAwayFromZero)
|
|
|
|
|
|
print("newpos : \(calc*100)")
|
|
print("newpos : \(calc2*100)")
|