Skip to content

Commit b01d923

Browse files
Will BlantonWill Blanton
authored andcommitted
inline functions
1 parent 273492c commit b01d923

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

zero/utilities/Color.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ abstract Color(Vec4)
162162
public inline function to_hex_24():Int return ((red * 255).round() & 0xFF) << 16 | ((green * 255).round() & 0xFF) << 8 | ((blue * 255).round() & 0xFF);
163163
public inline function from_int32(color:Int) return set(((color >> 16) & 0xff) / 255, ((color >> 8) & 0xff) / 255, (color & 0xff) / 255, ((color >> 24) & 0xff) / 255);
164164
public inline function equals(color:Color) return red == color.red && green == color.green && blue == color.blue && alpha == color.alpha;
165-
public function toString():String return 'r: $red | g: $green | b: $blue | a: $alpha | #${to_hex().hex()}';
165+
public inline function toString():String return 'r: $red | g: $green | b: $blue | a: $alpha | #${to_hex().hex()}';
166166

167167
public function set_HSL(h:Float, s:Float, l:Float):Color
168168
{

zero/utilities/Rect.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ abstract Rect(Vec4)
7676
return cast this;
7777
}
7878

79-
public function toString():String return 'x: ${this.x} | y: ${this.y} | width: $width | height: $height';
79+
public inline function toString():String return 'x: ${this.x} | y: ${this.y} | width: $width | height: $height';
8080

8181
public inline function area():Float return width * height;
8282
public inline function contains_point(vec2:Vec2) return top <= vec2.y && bottom >= vec2.y && left <= vec2.x && right >= vec2.x;

0 commit comments

Comments
 (0)