Архитектурный шаблон "Мрак в моделях" на нескольких языках и платформах
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.

24 line
343B

  1. import Foundation
  2. // Memory.
  3. struct PositionInstance: Position {
  4. var x: Float
  5. var y: Float
  6. }
  7. func memoryCreatePosition(_ x: Float, _ y: Float) -> PositionInstance {
  8. return .init(x: x, y: y)
  9. }
  10. // UTS.
  11. func utsFloor(_ value: Float) -> Float {
  12. floor(value)
  13. }
  14. func utsIndexArray(_ count: Float) -> [Int] {
  15. [Int](0..<Int(count))
  16. }