forked from NagaChiang/entity-tween
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
version bump: 0.10.0; updated entities to 1.0.16;
- Loading branch information
Showing
55 changed files
with
1,135 additions
and
461 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,30 @@ | ||
using Unity.Mathematics; | ||
using System.Runtime.CompilerServices; | ||
using Unity.Burst; | ||
using Unity.Mathematics; | ||
using UnityEngine; | ||
|
||
namespace DotsTween.Math | ||
{ | ||
[BurstCompile] | ||
internal static class Extensions | ||
{ | ||
public static float4 ToFloat4(this Color color) | ||
[BurstCompile] | ||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public static void ToFloat4(in this Color color, out float4 f4) | ||
{ | ||
return new float4(color.r, color.g, color.b, color.a); | ||
f4 = new float4(color.r, color.g, color.b, color.a); | ||
} | ||
|
||
/// <summary> | ||
/// Truncates alpha channel. | ||
/// </summary> | ||
/// <param name="color"></param> | ||
/// <returns></returns> | ||
public static float3 ToFloat3(this Color color) | ||
[BurstCompile] | ||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public static void ToFloat3(in this Color color, out float3 f3) | ||
{ | ||
return new float3(color.r, color.g, color.b); | ||
f3 = new float3(color.r, color.g, color.b); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.