首页 > 编程语言 > 详细

Unity Vector3扩展(*)重载

时间:2021-08-29 20:35:47      阅读:4      评论:0      收藏:0      [点我收藏+]
/// <summary>
/// 重载运算符 向量3相乘
/// </summary>
public class Vector3Multiply
{
    public float x { get; private set; }
    public float y { get; private set; }
    public float z { get; private set; }


    public Vector3Multiply(float x, float y, float z)
    {
        this.x = x;
        this.y = y;
        this.z = z;
    }


    public static Vector3 operator *(Vector3Multiply a, Vector3Multiply b) => new Vector3(a.x * b.x, a.y * b.y, a.z * b.z);
}

Unity Vector3扩展(*)重载

原文:https://www.cnblogs.com/godshadow/p/15196515.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!