Skip to content

Instantly share code, notes, and snippets.

View mmj-the-fighter's full-sized avatar

Manoj M J mmj-the-fighter

View GitHub Profile
@mmj-the-fighter
mmj-the-fighter / newton_raphson.cpp
Created November 8, 2026 01:04
Newton - Raphson root finding method impementation
#include <iostream>
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
@mmj-the-fighter
mmj-the-fighter / two_variable_lin_eqn_solver.cpp
Created November 7, 2026 03:06
Two variable linear equation solver
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
@mmj-the-fighter
mmj-the-fighter / ThreeSegmentAnimator
Created October 29, 2026 15:54
Helper to animate along a three segment polyline
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
@mmj-the-fighter
mmj-the-fighter / makedata.cpp
Created October 5, 2026 01:32
utility for creating test data.
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
@mmj-the-fighter
mmj-the-fighter / NaiveGramSchmidt.hpp
Last active September 27, 2026 12:56
An excercise for making orthonormal basis from a given basis using Gram Schmidt process. works only for R^3
/*
The following license is valid only for Non AI generated portion in this file:
ie. for the functions:
GramSchmidtProcess and its supporting functions: normalize, dot, scale and sub
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
@mmj-the-fighter
mmj-the-fighter / ptinsidepoly.cpp
Last active September 29, 2026 17:10
finding if a point inside polygon using winding angle sum method
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
@mmj-the-fighter
mmj-the-fighter / tiler.cpp
Created September 10, 2026 16:51
program for splitting rectangle into tiles in tiled rendering scenarios
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
@mmj-the-fighter
mmj-the-fighter / gaussian_elimination.cpp
Last active August 13, 2026 20:38
Program for Gaussian Elimination and Program for the solution of simultaneous linear equations with two variables
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
//1. helloworld
fn nod() {
println!("hello, world!");
}
//2. printing
fn printing() {
let num: i32 = 5;
let pi: f32 = 3.141516;
let str_pi: String = format!("{:.2}", pi);
@mmj-the-fighter
mmj-the-fighter / profiler.hpp
Last active July 1, 2026 15:31
simple profiler which supports nested calls
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and