bunny83 / utilities Goto Github PK
View Code? Open in Web Editor NEWA (hopfully) growing collection of various math, geometry and general utility classes for Unity3d and C#
License: MIT License
A (hopfully) growing collection of various math, geometry and general utility classes for Unity3d and C#
License: MIT License
Hi! I was unable to load the attached BMP, tried with different settings.
Game.zip
Hi, I'm using some of your code in my program (found it via a Google search). I noticed that in Range()
the cast to (int)
sometimes causes out-of-range values to be returned, since in C# the modulus operation is sign sensitive (for example -10 % 3 = -1
):
public int Range(int aMin, int aMax)
{
return aMin + (int)Next() % (aMax - aMin);
}
In my own code, I changed it to:
public int Range(int aMin, int aMax)
{
Debug.Assert(aMax > aMin);
return aMin + (int)((uint)Next() % (aMax - aMin));
}
(Edit: I don't think this would work when (aMax - aMin) >= 2^31
but I don't need such large ranges in my code)
Looking for bmploader (a) to see if any updates since 2017 (b) report a bug.
Attached file causes an index out of range crash
Blank18.zip
.
There is a bug with ReadPalette, some indexed BMP files are loaded as empty because ReadPalette sets zero alpha.
I've made a workaround:
//byte a = aReader.ReadByte(); Looks like a bug, BMP doesn't support transparency.
byte a = 255;
Attached bitmaps work fine in Windows but display all black in Unity.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.