C++ code style written in markdown.
Astyle code automatic formatting settings
You can use clang-format too.
Use tools like vera++
C++ code style written in markdown.
Astyle code automatic formatting settings
You can use clang-format too.
Use tools like vera++
#ifndef _POLYNOMIAL_REGRESSION_H | |
#define _POLYNOMIAL_REGRESSION_H __POLYNOMIAL_REGRESSION_H | |
/** | |
* PURPOSE: | |
* | |
* Polynomial Regression aims to fit a non-linear relationship to a set of | |
* points. It approximates this by solving a series of linear equations using | |
* a least-squares approach. | |
* | |
* We can model the expected value y as an nth degree polynomial, yielding |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class BoxMover : MonoBehaviour | |
{ | |
public enum Slide | |
{ | |
None, | |
Perpendicular, |
using UnityEngine; | |
using UnityEditor.ShaderGraph; | |
using System.Reflection; | |
// IMPORTANT: | |
// - tested with LWRP and Shader Graph 4.6.0-preview ONLY | |
// - likely to break in SG 5.x and beyond | |
// - for HDRP, add your own keyword to detect environment | |
[Title("Custom", "Main Light Data")] |
// | |
// @reference https://faithandbrave.hateblo.jp/entry/20100318/1268896477 | |
// @memo | |
// on CentOS: | |
// yum install libicu libicu-devel | |
// g++ -std=c++14 -o cvt convert.cpp `pkg-config --libs --cflags icu-uc icu-io` | |
// | |
#include <iostream> | |
#include <vector> |
#ifndef TRICUBIC_INCLUDED | |
#define TRICUBIC_INCLUDED | |
float4 Cubic(float v) | |
{ | |
float4 n = float4(1.0, 2.0, 3.0, 4.0) - v; | |
float4 s = n * n * n; | |
float x = s.x; | |
float y = s.y - 4.0 * s.x; | |
float z = s.z - 4.0 * s.y + 6.0 * s.x; |
Shader "WorldNormalFromDepthTexture" | |
{ | |
Properties { | |
[KeywordEnum(3 Tap, 4 Tap, Improved, Accurate)] _ReconstructionMethod ("Normal Reconstruction Method", Float) = 0 | |
} | |
SubShader | |
{ | |
Tags { "RenderType"="Transparent" "Queue"="Transparent" } | |
LOD 100 |
#include <gdnative_api_struct.gen.h> | |
#include <libavcodec/avcodec.h> | |
#include <libavutil/avutil.h> | |
#include <libavformat/avformat.h> | |
#include <libavutil/imgutils.h> | |
#include <pthread.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |