Skip to content

Instantly share code, notes, and snippets.

View pylixonly's full-sized avatar

pylix pylixonly

  • Malaysia
  • 02:22 (UTC +08:00)
View GitHub Profile

C++ Notes

Notes I took while learning C++.

Escape codes

std::endl; -> No escape code | Adds a new line and flushes the buffer
std::cout << "\n"; -> New line | Recommended in most cases instead of "std::endl"
std::cout << "\t"; -> Horizontal Tab
@paulhayes
paulhayes / ColorExt.cs
Last active July 20, 2022 11:37
Extension to Unity3d Color and Color32. Allows easy converting of Color to hex string.
using UnityEngine;
using System.Collections;
public static class ColorExt {
public static string ToHexString(this Color32 c){
return string.Format ("{0:X2}{1:X2}{2:X2}", c.r, c.g, c.b);
}
public static string ToHexString(this Color color){