---
title: Mathematicsを使ったプログラミング
product: Unity Editor
version: '6000.0'
latest_version: '7000.0'
status: This page documents version 6000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/ja-jp/engine/6000.0/manual/scripting/object-oriented-development/programming-math
latest_url: https://docs.unity.com/ja-jp/engine/7000.0/manual/scripting/object-oriented-development/programming-math.md
generated_at: 2026-11-14T04:30:25.974Z
locale: ja-jp
---

# Mathematicsを使ったプログラミング

> Unity の数学 API を使用して、三角関数、対数的な関数、その他の関数をアプリケーションに適用し、ベクトルでオブジェクトを移動し、ランダムな値を生成します。

Unity では、コード内の数学的な概念を操作できる公開 API がいくつか公開されています。これらの API は、ゲーム開発で一般的なベクトル、行列、その他の数学的構造を操作するのに役立ちます。

| **トピック**                                                                                                       | **説明**                                                                                                                           |
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| **[ベクトルでオブジェクトを動かす](/engine/6000.0/manual/scripting/object-oriented-development/programming-math/vectors.md)** | Unityの2D、3D、4D VectorクラスでVector演算を実行して、オブジェクトの位置とスピード、オブジェクト間の距離を管理します。                                                          |
| **[一般的な数学関数の使用](/engine/6000.0/manual/scripting/object-oriented-development/programming-math/class-mathf.md)** | Unity の [`Mathf`](/engine/6000.0/script-reference/unityengine/mathf.md) クラスを使用して、三角関数、対数的な関数、およびゲーム開発で一般的に必要とされるその他の数学関数を適用できます。 |
| **[ランダム性の使用](/engine/6000.0/manual/scripting/object-oriented-development/programming-math/class-random.md)**   | [`Random`](/engine/6000.0/script-reference/unityengine/random.md) クラスを使用して、ゲーム開発で一般的に必要とされるさまざまなタイプのランダムな値を生成します。                |

## 追加リソース##additional-resources

* [Unity スクリプティングリファレンス](ScriptRef:index)
* [Unity Mathematics パッケージ](https://docs.unity3d.com/Packages/com.unity.mathematics@latest)
