Unity 6.3
0 онлайн 85 гостей 3 в системе
Вход

Vector3.operator ==

Declaration

public static bool operator ==(Vector3 lhs, Vector3 rhs);

Описание

Возвращает true, если два вектора приблизительно равны.

Для учета погрешностей с плавающей точкой два вектора считаются равными, если величина их разницы меньше 1e-5.

Дополнительные ресурсы: Equals

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public Transform other;

void Example() { if (other && transform.position == other.position) { print("I'm at the same place as the other transform!"); } } }