summaryrefslogtreecommitdiff
path: root/WorldlineKeepers/Assets/Scripts/Utils/Vector4Extension.cs
blob: e4b9b357504eed4e3092c9fb70cf663ded7fd7f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEditor;
using UnityEngine;

public static class Vector4Extension
{

    public static Vector2 xy(this Vector4 src)
    {
        Vector2 xy = new Vector2();
        xy.x = src.x;
        xy.y = src.y;
        return xy;
    }

    public static Vector2 zw(this Vector4 src)
    {
        Vector2 zw = new Vector2();
        zw.x = src.z;
        zw.y = src.w;
        return zw;
    }

    public static Vector2 ToVector2(this Vector4 src)
    {
        Vector2 xy = new Vector2();
        xy.x = src.x;
        xy.y = src.y;
        return xy;
    }

}