【问题标题】:How can i get the rest of a division in Godot 3.1?我怎样才能在 Godot 3.1 中获得其余部分?
【发布时间】:2019-12-17 00:01:54
【问题描述】:

如果我将它除以 100,我想得到一个大数的余数,但我什么也找不到。你能帮帮我吗?

【问题讨论】:

标签: integer-division godot


【解决方案1】:

我猜你正在使用 GDScript 与 Godot 交互?试试这个:

var my_remainder = my_big_number % 100

我在the Operators section of the documentation 中找到了% 运算符。

【讨论】:

  • 这就是所谓的模运算符,% 字符是它在许多流行的编程语言中的表示方式。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-05-28
  • 2011-06-04
  • 2017-05-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多