summaryrefslogtreecommitdiff
path: root/marching/Assets/Scripts/Utils/Vector2Extension.cs
blob: 2fcaf60722cfca7ae51ca91033182ef8f885de6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

public static class Vector2Extension
{

    public static Vector3 ConvertToVector3(Vector2 src)
    {
        Vector3 dst = new Vector3();
        dst.x = src.x;
        dst.y = src.y;
        dst.z = 0;
        return dst;
    }

    public static Vector3 ToVector3(this Vector2 src)
    {
        return ConvertToVector3( src);
    }
}