Skip to content

1.3.1

Compare
Choose a tag to compare
@ltmx ltmx released this 22 Mar 09:39
· 153 commits to master since this release

v1.3.1

New Features

  • Matrix Truncation => float3x2(float4x4) // Truncates the input matrix to the desired size... can also be written as : float4x4.f3x2()
/// sets the value of x to f and returns f // Useful for modifying a variable in line.
public static T set<T>(this T f, out T x) {  x = f; return f; }

// example :
float3 x = new float3(1,1,1);

// here x is set before computing lengthsq()
var x = x.dim(4.2f).shuffle().set(out x).lengthsq() + x; 

// we would have to write two lines instead
x = x.dim(4.2f).shuffle();
x = x.lengthsq() + x;

Burst Compiled Function Pointers

Mew Methods

anyType.dim(otherType) => anyType* otherType // to add functionality missing from internal operator overloads // named dim to not confuse with mul()
anyType.greater(otherType) => anyType > otherType
anyType.less(otherType) =>  anyType < otherType
anyType.greatereq(otherType) =>  anyType >= otherType
anyType.lesseq(otherType) =>  anyType <= otherType
anyType.eq(otherType) =>  anyType == otherType
anyType.neq(otherType) =>  anyType != otherType
randseed(seed) => random float generated from a seed // internally : Random.Init(seed).Nextfloat()
randseed2(seed) => random float2 generated from a seed // internally : Random.Init(seed).Nextfloat()
randseed3(seed) => random float3 generated from a seed // internally : Random.Init(seed).Nextfloat()
randseed4(seed) => random float4 generated from a seed // internally : Random.Init(seed).Nextfloat()
anyType.append()
anyType.m2n1() => anyType* 2 - 1 // remaps anything from [0, 1] to [-1, 1]
quaternion generation functions
matrix generation functions
transformation functions
dot() // for int types
value.lerp(MatrixA, MatrixB) // functionality to interpolate any matrix
anyType.dim(otherType) => anyType * otherType // to add functionality for missing from operator overloads // 'dim' to not confuse with mul()
anyType.div(otherType) => anyType / otherType
anyType.add(otherType) => anyType + otherType
anyType.sub(otherType) => anyType - otherType
anyType.shuffle() // only for float2, float3 and float4
anyType.hash() // math.hash(anyType)
type generation methods float4(), float2(), float4x4(), etc
asuint() // new overloads
asbool() // new overloads

Fixed

rand(float)
rand(float float)
rand(float4 float)
randseed()
Burst Compiled Function Pointers

New Structs

struct byte1

Structs Updates

struct byte1; // Added Conversions, constructors / implicit and explicit casts / operator overloads + (New)
struct byte2; // Added Conversions, constructors / implicit and explicit casts / operator overloads + Using byte1 as unit type
struct byte3; // Added Conversions, constructors / implicit and explicit casts / operator overloads + Using byte1 as unit type
struct byte4; // Added Conversions, constructors / implicit and explicit casts / operator overloads + Using byte1 as unit type
struct bounds; // Added methods : Corners() , FaceCenters

Renamings

const Sqrt2Over2 => SQRT2_2
changed all double precision constant suffix from _D to _DBL for consistency
removed duplicate constants

Updates

  • Fixed Broken Documentation
  • Added Tons of Documentation

WIP

  • Multidimensional Noise Function
  • Signed Distance Functions
  • SDF Processing Functions
  • Hashing Functions
  • Function Iterators
  • Generic Jobs

Full Changelog: v1.3.0...1.3.1