NCoT Wiki
Easing Functions
Initializing search
    • Test Wiki Page
      • Ender 3 Slicer GCODE
      • Hibernation on Lenovo ThinkPad T14 Arch Linux
      • Proxmox Update Instructions
      • Upgrading Nextcloud Manually
      • Chicken Tikka Masala
      • Chickpea Protein Salad
      • Chorizo and Bean Stew
      • Creamy Cajun Chicken Pasta
      • Easy One Pot Chicken Ramen
      • Gym Notes
      • Naked Chicken Burrito Bowl
      • Noodle Bowls
      • One pot creamy garlic chicken & rice
      • Overnight Oats
      • Potato Frittata
      • Potato and chickpea curry
      • Protein Granola Bars Recipe
      • Protein bars
      • Spicy Chicken with Couscous
      • Mince hash
      • protein pancakes
      • C Coding Convention
      • Clangd
      • Easing Functions
      • Branching
        • 2D Rotation around a point
        • 3D Rotations with matrices
        • 3D Rotations without matrices
        • Homogeneous 4x4 matrices
        • Simple 3D Projection
        • Transformation Matrices
        • Animating Code
        • Getting Started
        • Motion Canvas, TypeScript, and React — Summary Reference

    Easing Functions

    t must be between 0 and 1

    def smoothstep(t):
        return t * t * (3 - 2 * t)
    
    def ease_in(t):
        return t * t
    
    def ease_out(t):
        return 1 - (1 - t) * (1 - t)
    
    def ease_in_out(t):
        return t * t * (3 - 2 * t)   # classic smoothstep
    
    Made with Material for MkDocs