public float4(CGUtility.float2 v, float z = 0f, float w = 0f) { this.x = v.x; this.y = v.y; this.z = z; this.w = w; }
private CGUtility.float4 TerrainCoords() { CGUtility.float2 @float = this.WorldPos.xz; if (this.Terrain_Mapping == 1f) { CGUtility.float2 float2 = this.TransformScale.xz * this.TerrainResolution; @float = (@float - (this.TransformPosition.xz - float2 / 2f)) / float2; } else { @float = (@float - this.TerrainPosition.xz) / this.TerrainResolution; } return(new CGUtility.float4(@float, 0f, this.LOD)); }
protected float distance(CGUtility.float2 a, CGUtility.float2 b) { return((a - b).magnitude); }
protected bool any(CGUtility.float2 v) { return(v.x != 0f || v.y != 0f); }
protected bool all(CGUtility.float2 v) { return(v.x * v.y != 0f); }
public float3(CGUtility.float2 v, float z = 0f) { this.x = v.x; this.y = v.y; this.z = z; }
protected CGUtility.float2 normalize(CGUtility.float2 v) { return(v.normalized); }
protected float length(CGUtility.float2 v) { return(v.magnitude); }
protected CGUtility.float2 lerp(CGUtility.float2 a, CGUtility.float2 b, float x) { return(new CGUtility.float2(a.x + (b.x - a.x) * x, a.y + (b.y - a.y) * x)); }
protected float dot(CGUtility.float2 a, CGUtility.float2 b) { return(a.x * b.x + a.y * b.y); }