Skip to content

Instantly share code, notes, and snippets.

@Osinko
Osinko / gist:48e071c8a2e3938548727d621b95c9c5
Created October 24, 2017 05:22
maxima用コード 6の倍数関連
amari:1$
for a:0 thru 6 do
for b:0 thru 6 do
(
amari:divide(divide((6*k+a)*(6*k+b),6*k)[2],6)[2],
/* C#の「!=」はmaximaでは「#」 */
if (amari#0) then
print("x=",(6*k+a),
",y=",(6*k+b),
",xy=",ratsimp((6*k+a)*(6*k+b)),
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.IO;
using System.Net;
using System.Xml;
//公式資料
//https://partner.steamgames.com/doc/webapi
@Osinko
Osinko / TargetDigit
Created May 1, 2017 11:18
狙った桁の抽出
using UnityEngine;
using System.Collections;
public class TargetDigit : MonoBehaviour
{
void Start()
{
print(Digit(123456789, 6)); //7桁目を表示(変数digは0を含んでカウントしている)
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Vector2SpherePos : MonoBehaviour
{
void Start()
{
//デカルト座標
Vector3 pos = new Vector3(1f, 4f, 2f);
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SpherePos : MonoBehaviour
{
public Transform targetTransform;
public float radius, theta, phi, speed;
//このシェーダーは法線に基づいてメッシュを着色します。頂点入力として、appdata_base を使用します
//出典:https://docs.unity3d.com/ja/current/Manual/SL-VertexProgramInputs.html
Shader "tutorial/VertexInputSimple" {
SubShader{
Pass{
CGPROGRAM
//頂点シェーダーとフラグメントシェーダーのプログラミング
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public class GridObj : MonoBehaviour
{
public Rect gridSize = new Rect(-0.5f, -0.5f, 1, 1);
public Color gridColor = new Color(0f, 0f, 0f);
public int gridDivid = 20; //グリッドの分割数。偶数に設定する事
public class SceneControler2 : MonoBehaviour {
DrawGraph dg;
AnimationSinVectorMesh animSin;
void Awake () {
GameObject go = Instantiate(Resources.Load("DrawGraph")) as GameObject;
dg = go.GetComponent<DrawGraph>();