Skip to content

Instantly share code, notes, and snippets.

@nopitech
Created July 9, 2018 11:47
Show Gist options
  • Save nopitech/afb9b0fb28b255b1e4764c4373eeb539 to your computer and use it in GitHub Desktop.
Save nopitech/afb9b0fb28b255b1e4764c4373eeb539 to your computer and use it in GitHub Desktop.
大きさが1のベクトルを返す
using UnityEngine;
public class VectorScript : MonoBehaviour
{
void Start()
{
Vector3 vec = new Vector3(100f, 10f, 30f);
//1.0, 0.1, 0.3 になる。
Vector3 nmz = vec.normalized;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment