Skip to content

Instantly share code, notes, and snippets.

View Indp-Dustin's full-sized avatar

Indie Developer Partners Indp-Dustin

View GitHub Profile
@Indp-Dustin
Indp-Dustin / SkinnedMeshRenderer.cs
Created December 19, 2016 10:17
Unity Code Rigging
using UnityEngine;
using System.Collections;
public class CustomSkinnedMesh : MonoBehaviour {
public Transform[] bones;
public Material mat;
public AnimationClip clip;
void Awake()
@Indp-Dustin
Indp-Dustin / Matrix.h
Created March 20, 2018 08:50
CK Math Class1
#pragma once
#include "stdafx.h"
struct Matrix2{public: float _11, _12; float _21, _22;
 Matrix2() {}; Matrix2(float m11, float m12, float m21, float m22) {  _11 = m11;  _12 = m12;
  _21 = m21;  _22 = m22; };
 void SetScale(float a, float b) {  SetIdentity();  // Add Code Here  _11 = a;  _22 = b; }
 void SetIdentity() {  _11 = 1.0f;  _12 = 0.0f;
  _21 = 0.0f;  _22 = 1.0f; };
 Matrix2 operator *(const Matrix2 Other) const;};
void DrawLine(Vector3 start, Vector3 dest)
{
}
void UpdateFrame(void)
{
Vector3 Pt1, Pt2;
Pt1.SetPoint(10, 10);
@Indp-Dustin
Indp-Dustin / FindM
Created October 4, 2018 04:18
FindM
long findM3(long n, long m)
{
int c = 0;
long v = 1;
bool squared = false;
int va[1000];
while (v * v <= n)
{
if (v * v < n)
@Indp-Dustin
Indp-Dustin / Algo1.cpp
Created October 4, 2018 07:48
diagonal print
#include "pch.h"
#include <iostream>
using namespace std;
const int square = 5;
const int start = 1;
int main()
{
int ystart = start;
@Indp-Dustin
Indp-Dustin / SharedPointerTesting.inl
Created October 18, 2018 12:29
Smart Pointer Library Test Code
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
#pragma once
/** Toggle this define to enable shared pointer testing features */
#define WITH_SHARED_POINTER_TESTS 0 && !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
enum class ESPMode;
@Indp-Dustin
Indp-Dustin / BigO.java
Created October 24, 2018 23:49
Big O Problem
void foo(int[] array)
{
int sum = 0;
int product = 1;
for(int i = 0; i < array.length; i++)
{
sum += array[i];
}
for(int i = 0; i < array.length; i++)
@Indp-Dustin
Indp-Dustin / Jumping.cpp
Created October 30, 2018 06:13
Jumping
// Exam1.cpp : 이 파일에는 'main' 함수가 포함됩니다. 거기서 프로그램 실행이 시작되고 종료됩니다.
//
#include "pch.h"
#include <iostream>
#include <vector>
using namespace std;
struct Step
#include "pch.h"
#include <iostream>
void swap(int* a, int* b)
{
int t = *a;
*a = *b;
*b = t;
}
@Indp-Dustin
Indp-Dustin / CountPairs.cpp
Created October 30, 2018 23:43
Counting Pairs
#include "pch.h"
#include <iostream>
#include <vector>
int pairs(int arr[], int n, int k)
{
int pairCount = 0;
for (int i = 0; i < n; i++)
{