Quick actions

cmd+k|ctrl+k

Navigation

Languages

Untitled

Snippet info

Language

Nim

Visibility

unlisted

Author

legacy-anonymous

Created

2017-04-07T21:30:21Z

Updated

2017-04-07T21:30:21Z


type
  Region*[T: int|float] = object
    left, top, right, bottom: T

# then

for i in 0..5:
  var r: Region[float]
  r.left = float(i+1)
  r.top = float(i+2)
  r.right = float(i+3)
  r.bottom = float(i+4)
  echo repr(r)
INFO