Sha256: e8ce7b77df637a9355a9aa358c33ec55cb297cc863832110e50baed96718aedf
Contents?: true
Size: 257 Bytes
Versions: 6
Compression:
Stored size: 257 Bytes
Contents
module Tween def self.move_towards(from:, to:, speed:) direction = to - from step = [direction.length, speed * Global.frame_time].min return to if step.zero? direction = direction.normalize return from + (direction * step) end end
Version data entries
6 entries across 6 versions & 1 rubygems