# math.SnapTo

- **Ortam:** İstemci, Sunucu, Menü
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/math.SnapTo
- **Çeviri tarihi:** 2026-08-05

```lua
number math.SnapTo( number input, number snapTo )
```

## Açıklama

Verilen sayının en yakın çarpımına bir sayı çeker. [Angle:SnapTo](https://gmod.tr/wiki/Angle:SnapTo).

## Argümanlar

1.. [numara](https://gmod.tr/wiki/number) **Giriş**: Çıkartmak için numara.
2.. [numara](https://gmod.tr/wiki/number) **SnapTo**: Giriş numarasını neye bağlayacağım.

## Geri dönüşler

1.. [numara](https://gmod.tr/wiki/number): Sıkıştırılmış değer.

### Örnek

Örnek kullanım

```lua
print( math.SnapTo( 0, 15 ) )
print( math.SnapTo( 10, 15 ) )
print( math.SnapTo( 20, 15 ) )
print( math.SnapTo( 22.2, 15 ) )
print( math.SnapTo( 22.5, 15 ) )
print( math.SnapTo( 43, 15 ) )
```

**Çıkış:**

```lua
0
15
15
15
30
45
```

- [GMod Wiki ana sayfası](https://gmod.tr/wiki)

---

[Tüm sunucular](https://gmod.tr/) · [GmodTR Launcher](https://gmod.tr/launcher) · [Rehber](https://gmod.tr/rehber) · [GMod Wiki](https://gmod.tr/wiki) · [GmodTR nedir?](https://gmod.tr/hakkinda) · [Sunucu ekle](https://gmod.tr/sunucu-ekle) · [Discord](https://discord.gg/gmodtr)

Kaynak: https://gmod.tr/wiki/math.SnapTo
